The sound energy buffer is now cleared inside decompressSound()

svn-id: r35753
This commit is contained in:
Filippos Karapetis 2009-01-06 13:09:16 +00:00
parent de7721c638
commit ef78bbdf0d
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;