mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- use the game timer, not the Build timer for the sound eviction delay.
This is supposed to wait for two game frames to be on the safe side.
This commit is contained in:
parent
e1424d454f
commit
de871c9ab9
5 changed files with 6 additions and 6 deletions
|
@ -242,8 +242,8 @@ void S_SerializeSounds(FSerializer& arc)
|
|||
}
|
||||
arc.EndArray();
|
||||
}
|
||||
// Build runs at 120 fps, we need to allow a small delay here.
|
||||
soundEngine->SetRestartTime(I_GetBuildTime() + 6);
|
||||
// Add a small delay so that eviction only runs once the game is up and runnnig.
|
||||
soundEngine->SetRestartTime(I_GetTime() + 2);
|
||||
}
|
||||
GSnd->Sync(false);
|
||||
GSnd->UpdateSounds();
|
||||
|
|
|
@ -522,7 +522,7 @@ void UpdateSounds()
|
|||
|
||||
|
||||
soundEngine->SetListener(listener);
|
||||
soundEngine->UpdateSounds(gameclock);
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
soundEngine->EnumerateChannels([](FSoundChan* chan)
|
||||
{
|
||||
if (!(chan->ChanFlags & (CHANF_UI|CHANF_FORGETTABLE)))
|
||||
|
|
|
@ -353,7 +353,7 @@ void S_Update(void)
|
|||
}
|
||||
listener.ListenerObject = ud.camerasprite == -1 ? nullptr : &sprite[ud.camerasprite];
|
||||
soundEngine->SetListener(listener);
|
||||
soundEngine->UpdateSounds(I_GetBuildTime());
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -711,7 +711,7 @@ void EndOfLevel()
|
|||
COVER_SetReverb(0); // Reset reverb
|
||||
Player[myconnectindex].Reverb = 0;
|
||||
StopSound();
|
||||
soundEngine->UpdateSounds(I_GetBuildTime());
|
||||
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,7 @@ void DoUpdateSounds(void)
|
|||
soundEngine->SetListener(listener);
|
||||
|
||||
UpdateAmbients();
|
||||
soundEngine->UpdateSounds(I_GetBuildTime());
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue