From ef78bbdf0d41f773c76d1e1fb8c47d0339e2a935 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 Jan 2009 13:09:16 +0000 Subject: The sound energy buffer is now cleared inside decompressSound() svn-id: r35753 --- engines/made/scriptfuncs.cpp | 2 -- engines/made/sound.cpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index ce084bfc7d..df56f9c20e 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -237,7 +237,6 @@ int16 ScriptFunctions::sfPlaySound(int16 argc, int16 *argv) { _vm->_autoStopSound = (argv[0] == 1); } if (soundNum > 0) { - soundEnergy.clear(); _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, false)); } @@ -547,7 +546,6 @@ int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) { int16 soundNum = argv[0]; _vm->_mixer->stopHandle(_audioStreamHandle); if (soundNum > 0) { - soundEnergy.clear(); _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, false)); _vm->_autoStopSound = true; diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp index e397bd584f..5bf35ce0af 100644 --- a/engines/made/sound.cpp +++ b/engines/made/sound.cpp @@ -52,6 +52,8 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou {16, 2, 0x0F, 4} }; + soundEnergy.clear(); + while (chunkCount--) { deltaType = (*source) >> 6; workChunkSize = chunkSize; -- cgit v1.2.3