From a4da6f1ac1d5b36e72af863dbdc36542b1d8127e Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 16 May 2008 22:31:26 +0000 Subject: [PATCH] - Fixed: s_sound.cpp had its own idea of whether or not sounds were paused and did not entirely keep it in sync with the sound system's. This meant that when starting a new game from the menu, all sounds were played as menu sounds until you did something to pause the game, because s_sound.cpp thought sounds were unpaused, while the FMOD system thought they were. SVN r975 (trunk) --- docs/rh-log.txt | 7 +++++++ src/s_sound.cpp | 10 ++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index ca032cbb5..682b479a9 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,10 @@ +May 16, 2008 +- Fixed: s_sound.cpp had its own idea of whether or not sounds were paused + and did not entirely keep it in sync with the sound system's. This meant + that when starting a new game from the menu, all sounds were played as + menu sounds until you did something to pause the game, because s_sound.cpp + thought sounds were unpaused, while the FMOD system thought they were. + May 15, 2008 (Changes by Graf Zahl) - I finally managed to test the translucency options for composite texture definitions in HIRESTEX. The feature should be complete now. diff --git a/src/s_sound.cpp b/src/s_sound.cpp index efe879679..1e82994ea 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -103,7 +103,6 @@ static void CalcPosVel(fixed_t *pt, AActor *mover, int constz, float pos[3], // PRIVATE DATA DEFINITIONS ------------------------------------------------ -static bool SoundPaused; // whether sound effects are paused static bool MusicPaused; // whether music is paused static MusPlayingInfo mus_playing; // music currently being played static FString LastSong; // last music that was played @@ -279,7 +278,6 @@ void S_Init () // no sounds are playing, and they are not paused MusicPaused = false; - SoundPaused = false; } //========================================================================== @@ -419,8 +417,6 @@ void S_Start () LastLocalSndSeq = LocalSndSeq; } - SoundPaused = false; - // stop the old music if it has been paused. // This ensures that the new music is started from the beginning // if it's the same as the last one and it has been paused. @@ -1137,10 +1133,9 @@ void S_PauseSound (bool notmusic) I_PauseSong (mus_playing.handle); MusicPaused = true; } - if (GSnd != NULL && !SoundPaused) + if (GSnd != NULL) { GSnd->SetSfxPaused (true); - SoundPaused = true; } } @@ -1158,10 +1153,9 @@ void S_ResumeSound () I_ResumeSong (mus_playing.handle); MusicPaused = false; } - if (GSnd != NULL && SoundPaused) + if (GSnd != NULL) { GSnd->SetSfxPaused (false); - SoundPaused = false; } }