aboutsummaryrefslogtreecommitdiff
path: root/engines/made
diff options
context:
space:
mode:
authorFilippos Karapetis2009-01-06 13:09:16 +0000
committerFilippos Karapetis2009-01-06 13:09:16 +0000
commitef78bbdf0d41f773c76d1e1fb8c47d0339e2a935 (patch)
tree683d3e406107913b39e5aa3300ae862e27e447cf /engines/made
parentde7721c63863018dc70aa5b7cf135d373c45892a (diff)
downloadscummvm-rg350-ef78bbdf0d41f773c76d1e1fb8c47d0339e2a935.tar.gz
scummvm-rg350-ef78bbdf0d41f773c76d1e1fb8c47d0339e2a935.tar.bz2
scummvm-rg350-ef78bbdf0d41f773c76d1e1fb8c47d0339e2a935.zip
The sound energy buffer is now cleared inside decompressSound()
svn-id: r35753
Diffstat (limited to 'engines/made')
-rw-r--r--engines/made/scriptfuncs.cpp2
-rw-r--r--engines/made/sound.cpp2
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;