aboutsummaryrefslogtreecommitdiff
path: root/engines/chewy/sound.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2016-10-07 09:31:16 +0300
committerFilippos Karapetis2016-10-07 09:31:16 +0300
commitc3a4950c983235ce566e6fc96856b5848c4a38f5 (patch)
tree493b2427f835a1d81bb048b7696922abdb5af50a /engines/chewy/sound.cpp
parent7002ede1ed03b1588e18ff41129e000a63081792 (diff)
downloadscummvm-rg350-c3a4950c983235ce566e6fc96856b5848c4a38f5.tar.gz
scummvm-rg350-c3a4950c983235ce566e6fc96856b5848c4a38f5.tar.bz2
scummvm-rg350-c3a4950c983235ce566e6fc96856b5848c4a38f5.zip
CHEWY: Properly dispose audio streams after use
Diffstat (limited to 'engines/chewy/sound.cpp')
-rw-r--r--engines/chewy/sound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index fc27f637d4..e0e84e2101 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -49,7 +49,7 @@ void Sound::playSound(int num, bool loop) {
Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
Audio::makeRawStream(data,
sound->size, 22050, Audio::FLAG_UNSIGNED,
- DisposeAfterUse::NO),
+ DisposeAfterUse::YES),
loop ? 0 : 1);
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream);
@@ -70,7 +70,7 @@ void Sound::playMusic(int num, bool loop) {
Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
Audio::makeRawStream(data,
chunk->size, 22050, Audio::FLAG_UNSIGNED,
- DisposeAfterUse::NO),
+ DisposeAfterUse::YES),
loop ? 0 : 1);
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream);
@@ -84,7 +84,7 @@ void Sound::playSpeech(int num) {
Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
Audio::makeRawStream(data,
sound->size, 22050, Audio::FLAG_UNSIGNED,
- DisposeAfterUse::NO),
+ DisposeAfterUse::YES),
1);
_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream);