From 557bb394de6619dd1f360b72333fd2ec7b3defab Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Jan 2010 00:56:29 +0000 Subject: Get rid of Mixer::FLAG_AUTOFREE. Also fix several recently introduced new/delete vs. malloc/free mismatches. svn-id: r47369 --- engines/tinsel/bmv.cpp | 4 ++-- engines/tinsel/sound.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/tinsel') diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index 85cc9bc7f2..50a0d5193c 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -446,14 +446,14 @@ void BMVPlayer::MovieAudio(int audioOffset, int blobs) { if (audioOffset == 0 && blobs == 0) blobs = 57; - byte *data = new byte[blobs * 128]; + byte *data = (byte *)malloc(blobs * 128); if (audioOffset != 0) PrepAudio(bigBuffer+audioOffset, blobs, data); else memset(data, 0, blobs * 128); - _audioStream->queueBuffer(data, blobs * 128, Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_STEREO); + _audioStream->queueBuffer(data, blobs * 128, DisposeAfterUse::YES, Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_STEREO); if (currentSoundFrame == ADVANCE_SOUND) { if (!audioStarted) { diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp index 8f6dd762ba..8c3ddbaf3f 100644 --- a/engines/tinsel/sound.cpp +++ b/engines/tinsel/sound.cpp @@ -153,8 +153,8 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound #endif break; default: - _vm->_mixer->playRaw(type, &curChan.handle, sampleBuf, sampleLen, 22050, - Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); + _vm->_mixer->playRaw(type, &curChan.handle, sampleBuf, sampleLen, DisposeAfterUse::YES, 22050, + Audio::Mixer::FLAG_UNSIGNED); break; } if (sampleStream) { -- cgit v1.2.3