diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 615eccf9d0..a1d895130f 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,7 +1,7 @@ -October 21, 2008 (Changes by Graf Zahl) -- Added a proper function parser to the expression evaluator and converted - sin/cos and action specials to use it. The old evaluator is gone now. -- fixed some GCC problems with autosegs. +October 23, 2008 (Changes by Graf Zahl) +- Fixed: The high level sound code must not rely on FMod immediately returning + the sound channel data when a sound is being stopped. This caused + an endless loop when changing levels with Strife's Flamethrower active. October 20, 2008 - Game time is now frozen during screen wipes. This obsoletes the DEM_WIPEON diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 7d42c38ab2..ddfb286a0d 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -318,10 +318,14 @@ void S_Shutdown () { FSoundChan *chan, *next; - while (Channels != NULL) + chan = Channels; + while (chan != NULL) { - S_StopChannel(Channels); + next = chan->NextChan; + S_StopChannel(chan); + chan = next; } + GSnd->UpdateSounds(); for (chan = FreeChannels; chan != NULL; chan = next) { @@ -1441,9 +1445,13 @@ void S_StopSound (const FPolyObj *poly, int channel) void S_StopAllChannels () { SN_StopAllSequences(); - while (Channels != NULL) + + FSoundChan *chan = Channels; + while (chan != NULL) { - S_StopChannel(Channels); + FSoundChan *next = chan->NextChan; + S_StopChannel(chan); + chan = next; } GSnd->UpdateSounds(); }