diff options
-rw-r--r-- | engines/toltecs/movie.cpp | 2 | ||||
-rw-r--r-- | engines/toltecs/sound.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp index 8cd14526a5..ab920d5c49 100644 --- a/engines/toltecs/movie.cpp +++ b/engines/toltecs/movie.cpp @@ -197,7 +197,7 @@ void MoviePlayer::fetchAudioChunks() { if (chunkType == 4) { byte *chunkBuffer = new byte[chunkSize]; _vm->_arc->read(chunkBuffer, chunkSize); - _audioStream->queueBuffer(chunkBuffer, chunkSize, Audio::Mixer::FLAG_UNSIGNED); + _audioStream->queueBuffer(chunkBuffer, chunkSize, DisposeAfterUse::YES, Audio::Mixer::FLAG_UNSIGNED); chunkBuffer = NULL; prefetchChunkCount++; _soundChunkFramesLeft += _framesPerSoundChunk; diff --git a/engines/toltecs/sound.cpp b/engines/toltecs/sound.cpp index 875fd0b935..d479b86275 100644 --- a/engines/toltecs/sound.cpp +++ b/engines/toltecs/sound.cpp @@ -33,6 +33,7 @@ #include "graphics/cursorman.h" #include "sound/mixer.h" +#include "sound/raw.h" #include "toltecs/toltecs.h" #include "toltecs/palette.h" @@ -151,7 +152,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa // Background sounds if (type == kChannelTypeBackground) flags |= Audio::Mixer::FLAG_LOOP; - Audio::AudioStream *stream = Audio::makeLinearInputStream(soundResource->data, soundResource->size, 22050, flags, 0, 0); + Audio::AudioStream *stream = Audio::makeRawMemoryStream(soundResource->data, soundResource->size, DisposeAfterUse::YES, 22050, flags, 0, 0); channels[freeChannel].type = type; channels[freeChannel].resIndex = resIndex; |