diff --git a/docs/rh-log.txt b/docs/rh-log.txt index cf36a44390..2f57ffdbf5 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ -May 16, 2009 +May 19, 2009 +- Fixed: SetSoundPaused() still needs to call S_PauseSound() to pause music + that isn't piped through the digital sound system. (Was removed in r1004.) + +May 16, 2009 - Added input buffering to the Implode and Shrink routines for a marked speedup. - Replaced the Shanno-Fano/Huffman reading routines from FZipExploder with diff --git a/src/d_net.cpp b/src/d_net.cpp index 74f10bb7c6..09c82a6e29 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2181,12 +2181,12 @@ void Net_DoCommand (int type, BYTE **stream, int player) if (paused) { paused = 0; - S_ResumeSound (); + S_ResumeSound (false); } else { paused = player + 1; - S_PauseSound (false); + S_PauseSound (false, false); } BorderNeedRefresh = screen->GetPageCount (); } diff --git a/src/g_level.cpp b/src/g_level.cpp index c0be550d7a..f55bd94547 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -391,7 +391,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel) if (paused) { paused = 0; - S_ResumeSound (); + S_ResumeSound (false); } if (StatusBar != NULL) diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 692ad2faf1..f72e6a4783 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -1366,7 +1366,7 @@ void APowerTimeFreezer::InitEffect( ) return; // When this powerup is in effect, pause the music. - S_PauseSound( false ); + S_PauseSound( false, false ); // Give the player and his teammates the power to move when time is frozen. Owner->player->cheats |= CF_TIMEFREEZE; @@ -1441,7 +1441,7 @@ void APowerTimeFreezer::EndEffect( ) level.flags2 &= ~LEVEL2_FROZEN; // Also, turn the music back on. - S_ResumeSound( ); + S_ResumeSound( false ); // Nothing more to do if there's no owner. if (( Owner == NULL ) || ( Owner->player == NULL )) diff --git a/src/p_tick.cpp b/src/p_tick.cpp index b4a97dd841..c0e5dfb143 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -57,7 +57,7 @@ bool P_CheckTickerPaused () && players[consoleplayer].viewz != 1 && wipegamestate == gamestate) { - S_PauseSound (!(level.flags2 & LEVEL2_PAUSE_MUSIC_IN_MENUS)); + S_PauseSound (!(level.flags2 & LEVEL2_PAUSE_MUSIC_IN_MENUS), false); return true; } return false; @@ -104,7 +104,7 @@ void P_Ticker (void) } if ( i == MAXPLAYERS ) - S_ResumeSound (); + S_ResumeSound (false); P_ResetSightCounters (false); diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 7815ce8d83..d30af704e6 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -1634,15 +1634,18 @@ bool S_IsActorPlayingSomething (AActor *actor, int channel, int sound_id) // Stop music and sound effects, during game PAUSE. //========================================================================== -void S_PauseSound (bool notmusic) +void S_PauseSound (bool notmusic, bool notsfx) { if (!notmusic && mus_playing.handle && !MusicPaused) { I_PauseSong (mus_playing.handle); MusicPaused = true; } - SoundPaused = true; - GSnd->SetSfxPaused (true, 0); + if (!notsfx) + { + SoundPaused = true; + GSnd->SetSfxPaused (true, 0); + } } //========================================================================== @@ -1652,15 +1655,18 @@ void S_PauseSound (bool notmusic) // Resume music and sound effects, after game PAUSE. //========================================================================== -void S_ResumeSound () +void S_ResumeSound (bool notsfx) { if (mus_playing.handle && MusicPaused) { I_ResumeSong (mus_playing.handle); MusicPaused = false; } - SoundPaused = false; - GSnd->SetSfxPaused (false, 0); + if (!notsfx) + { + SoundPaused = false; + GSnd->SetSfxPaused (false, 0); + } } //========================================================================== diff --git a/src/s_sound.h b/src/s_sound.h index c394ed8f02..a2cfe60bea 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -316,8 +316,8 @@ int S_GetMusic (char **name); void S_StopMusic (bool force); // Stop and resume music, during game PAUSE. -void S_PauseSound (bool notmusic); -void S_ResumeSound (); +void S_PauseSound (bool notmusic, bool notsfx); +void S_ResumeSound (bool notsfx); // // Updates music & sounds diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index 1a122e8762..04028e7583 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -1562,6 +1562,7 @@ static void SetSoundPaused (int state) { if (paused <= 0) { + S_ResumeSound(true); if (GSnd != NULL) { GSnd->SetInactive(false); @@ -1580,6 +1581,7 @@ static void SetSoundPaused (int state) { if (paused == 0) { + S_PauseSound(false, true); if (GSnd != NULL) { GSnd->SetInactive(true);