mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 20:20:54 +00:00
- fixed sound updating by moving the engine's UpdateSound call into the main loop.
This needs to be called unconditionally for every frame being rendered, not all of the game modules did that. Placing this call here ensures that it is independent of anything the games do.
This commit is contained in:
parent
de871c9ab9
commit
cc5e6d19c3
7 changed files with 4 additions and 8 deletions
|
@ -137,7 +137,7 @@ void sfxUpdate3DSounds(void)
|
|||
|
||||
listener.ListenerObject = gMe->pSprite;
|
||||
soundEngine->SetListener(listener);
|
||||
soundEngine->UpdateSounds(gameclock);
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
}
|
||||
|
||||
FSoundID getSfx(FSoundID soundId, float &attenuation, int &pitch, int &relvol)
|
||||
|
|
|
@ -930,9 +930,11 @@ void app_loop()
|
|||
if (gamestate == GS_LEVEL) DrawFullscreenBlends();
|
||||
DrawRateStuff();
|
||||
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
Mus_UpdateMusic(); // must be at the end.
|
||||
|
||||
videoNextPage();
|
||||
videoSetBrightness(0); // immediately reset this so that the value doesn't stick around in the backend.
|
||||
Mus_UpdateMusic(); // must be at the end.
|
||||
}
|
||||
catch (CRecoverableError& err)
|
||||
{
|
||||
|
|
|
@ -522,7 +522,6 @@ void UpdateSounds()
|
|||
|
||||
|
||||
soundEngine->SetListener(listener);
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
soundEngine->EnumerateChannels([](FSoundChan* chan)
|
||||
{
|
||||
if (!(chan->ChanFlags & (CHANF_UI|CHANF_FORGETTABLE)))
|
||||
|
|
|
@ -246,8 +246,6 @@ void DrawView(double smoothRatio, bool sceneonly)
|
|||
fix16_t nAngle;
|
||||
fix16_t pan;
|
||||
|
||||
UpdateSounds();
|
||||
|
||||
zbob = Sin(2 * bobangle) >> 3;
|
||||
|
||||
int nPlayerSprite = PlayerList[nLocalPlayer].nSprite;
|
||||
|
|
|
@ -353,7 +353,6 @@ void S_Update(void)
|
|||
}
|
||||
listener.ListenerObject = ud.camerasprite == -1 ? nullptr : &sprite[ud.camerasprite];
|
||||
soundEngine->SetListener(listener);
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -711,7 +711,6 @@ void EndOfLevel()
|
|||
COVER_SetReverb(0); // Reset reverb
|
||||
Player[myconnectindex].Reverb = 0;
|
||||
StopSound();
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
// NextLevel must be null while the intermission is running, but we still need the value for later
|
||||
auto localNextLevel = NextLevel;
|
||||
NextLevel = nullptr;
|
||||
|
|
|
@ -604,7 +604,6 @@ void DoUpdateSounds(void)
|
|||
soundEngine->SetListener(listener);
|
||||
|
||||
UpdateAmbients();
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue