aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-19 17:09:41 +0000
committerWillem Jan Palenstijn2011-11-20 22:43:08 +0100
commit5948672be5bda52ec5143016cb8b02a29e7d9276 (patch)
tree6ebaf72def7eb1363a044eb22fc959d49402a0ec
parentac97b441ec5cfae02db056138fdba0d96198b233 (diff)
downloadscummvm-rg350-5948672be5bda52ec5143016cb8b02a29e7d9276.tar.gz
scummvm-rg350-5948672be5bda52ec5143016cb8b02a29e7d9276.tar.bz2
scummvm-rg350-5948672be5bda52ec5143016cb8b02a29e7d9276.zip
TOLTECS: Fixed compilation with the latest sound changes in the trunk
-rw-r--r--engines/toltecs/movie.cpp2
-rw-r--r--engines/toltecs/sound.cpp3
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;