aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorMax Horn2010-01-19 00:56:29 +0000
committerMax Horn2010-01-19 00:56:29 +0000
commit557bb394de6619dd1f360b72333fd2ec7b3defab (patch)
treeb1166a12105d01c92edb528177d24aa5115232e5 /engines/saga
parent69be7476212916b166ac16db41253cd367fb0dcc (diff)
downloadscummvm-rg350-557bb394de6619dd1f360b72333fd2ec7b3defab.tar.gz
scummvm-rg350-557bb394de6619dd1f360b72333fd2ec7b3defab.tar.bz2
scummvm-rg350-557bb394de6619dd1f360b72333fd2ec7b3defab.zip
Get rid of Mixer::FLAG_AUTOFREE.
Also fix several recently introduced new/delete vs. malloc/free mismatches. svn-id: r47369
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/music.cpp2
-rw-r--r--engines/saga/sound.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index bd089f1b38..70b62dbd02 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -304,7 +304,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
(uint32)resData->offset + offs, (uint32)resData->offset + resData->size - offs);
if (!_digitalMusicContext->isCompressed()) {
- byte musicFlags = Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_STEREO |
+ byte musicFlags = Audio::Mixer::FLAG_STEREO |
Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN;
Audio::RawDiskStreamAudioBlock audioBlocks[1];
audioBlocks[0].pos = 0;
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 2636567880..e8307699ff 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -66,8 +66,6 @@ SndHandle *Sound::getHandle() {
void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume,
sndHandleType handleType, bool loop) {
- buffer.flags |= Audio::Mixer::FLAG_AUTOFREE;
-
if (loop)
buffer.flags |= Audio::Mixer::FLAG_LOOP;
@@ -76,7 +74,7 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int
if (!buffer.isCompressed) {
_mixer->playRaw(soundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, buffer.flags, -1, volume);
+ buffer.size, DisposeAfterUse::YES, buffer.frequency, buffer.flags, -1, volume);
} else {
Audio::AudioStream *stream = 0;