diff options
author | Torbjörn Andersson | 2003-08-31 17:28:36 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-08-31 17:28:36 +0000 |
commit | e60ee06e2d0a885cfc71fbb46a2b2fe564ba90b4 (patch) | |
tree | afcc733e83f6fce9ef7093a94f72393575b58d4a /sword2 | |
parent | b5ece53748f8aa5e0a29d1ebbec68c80bf36d621 (diff) | |
download | scummvm-rg350-e60ee06e2d0a885cfc71fbb46a2b2fe564ba90b4.tar.gz scummvm-rg350-e60ee06e2d0a885cfc71fbb46a2b2fe564ba90b4.tar.bz2 scummvm-rg350-e60ee06e2d0a885cfc71fbb46a2b2fe564ba90b4.zip |
When a fading music channel is freed to make room for new music, or when a
music channel has faded out, destroy the channel immediately. Don't wait
for the mixer to finish it off.
This seems to fix a problem where the mixer would eventually run out of
slots if you left the Quit dialog showing for too long.
Unfortunately I don't know if it fixes the "out of slots" errors I
encountered once during normal play. Oh well, time will tell...
svn-id: r9942
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/driver/d_sound.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index 25a7bc2465..9d708479b5 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -1196,7 +1196,7 @@ int32 Sword2Sound::StreamCompMusic(const char *filename, uint32 musicId, int32 l primaryStream = 1; musFading[primaryStream] = 0; - g_engine->_mixer->endStream(soundHandleMusic[primaryStream]); + g_engine->_mixer->stop(soundHandleMusic[primaryStream]); musStreaming[primaryStream] = 0; soundHandleMusic[primaryStream] = 0; } @@ -1754,7 +1754,7 @@ void Sword2Sound::UpdateCompSampleStreaming(void) { if (musFading[i]) { if (musFading[i] < 0) { if (++musFading[i] == 0) { - g_engine->_mixer->endStream(soundHandleMusic[i]); + g_engine->_mixer->stop(soundHandleMusic[i]); musStreaming[i] = 0; musLooping[i] = 0; soundHandleMusic[i] = 0; |