diff options
author | Paweł Kołodziejski | 2003-09-01 06:23:04 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-09-01 06:23:04 +0000 |
commit | 56ca9f03df72d074ca67197390f8f13df13cb607 (patch) | |
tree | 2a1496e72b3816f34c9854757361675a8d2656a1 /sword2/driver | |
parent | beb138d4d80ca3292ac81ff03232c474ac01da2b (diff) | |
download | scummvm-rg350-56ca9f03df72d074ca67197390f8f13df13cb607.tar.gz scummvm-rg350-56ca9f03df72d074ca67197390f8f13df13cb607.tar.bz2 scummvm-rg350-56ca9f03df72d074ca67197390f8f13df13cb607.zip |
possibly fixes for not exist id stream channel
svn-id: r9951
Diffstat (limited to 'sword2/driver')
-rw-r--r-- | sword2/driver/d_sound.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index 5fecba02b8..051487f223 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -1209,7 +1209,7 @@ uint8 Sword2Sound::IsFxMute(void) { } void Sword2Sound::StartMusicFadeDown(int i) { - g_engine->_mixer->endStream(soundHandleMusic[i]); + g_engine->_mixer->stop(soundHandleMusic[i]); musFading[i] = -16; musStreaming[i] = 0; fpMus.close(); @@ -1903,9 +1903,10 @@ void Sword2Sound::UpdateCompSampleStreaming(void) { if (soundHandleMusic[i] == 0) { warning("play music appendStream(): this shouldn't happen"); - int volume = musicVolTable[volMusic[i]]; - soundHandleMusic[i] = g_engine->_mixer->newStream(data16, bufferSizeMusic, 22050, - SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE, 100000, volume, 0); + assert(soundHandleMusic[i]); +// int volume = musicVolTable[volMusic[i]]; +// soundHandleMusic[i] = g_engine->_mixer->newStream(data16, bufferSizeMusic, 22050, +// SoundMixer::FLAG_16BITS | SoundMixer::FLAG_AUTOFREE, 100000, volume, 0); } else { g_engine->_mixer->appendStream(soundHandleMusic[i], data16, len); } @@ -1917,6 +1918,7 @@ void Sword2Sound::UpdateCompSampleStreaming(void) { // End of the music so we need to start fading and start the music again if (fade) { + g_engine->_mixer->stop(soundHandleMusic[i]); soundHandleMusic[i] = 0; musFading[i] = -16; // Fade the old music @@ -1930,8 +1932,6 @@ void Sword2Sound::UpdateCompSampleStreaming(void) { StreamCompMusic(musFilename[i], musId[i], musLooping[i]); } } - } else { - soundHandleMusic[i] = 0; } } } |