- uncoupled OpenAL music updates from UpdateSounds.

UpdateSounds will not be called during screen wipes and the entire setup of this function suggests that this is not advisable at all.
The OpenAL stream updates were done deep inside this function implicitly.
This caused music to stop while a wipe was in progress. So in order to allow uninterrupted music playback during screen wipes the music updates need to be handled separately from sound updates and be called both in the main loop and the wipe loop.

I think that the OpenAL music updating should be offloaded to a separate thread but at least it's working now without causing interruptions during wipes.
This commit is contained in:
Christoph Oelckers 2015-04-25 10:26:14 +02:00
commit dccd35ef29
6 changed files with 42 additions and 20 deletions

View file

@ -905,6 +905,7 @@ void D_Display ()
} while (diff < 1);
wipestart = nowtime;
done = screen->WipeDo (1);
S_UpdateMusic(); // OpenAL needs this to keep the music running, thanks to a complete lack of a sane streaming implementation using callbacks. :(
C_DrawConsole (hw2d); // console and
M_Drawer (); // menu are drawn even on top of wipes
screen->Update (); // page flip or blit buffer
@ -1003,6 +1004,7 @@ void D_DoomLoop ()
// Update display, next frame, with current state.
I_StartTic ();
D_Display ();
S_UpdateMusic(); // OpenAL needs this to keep the music running, thanks to a complete lack of a sane streaming implementation using callbacks. :(
}
catch (CRecoverableError &error)
{