diff options
author | Max Horn | 2010-01-19 00:56:29 +0000 |
---|---|---|
committer | Max Horn | 2010-01-19 00:56:29 +0000 |
commit | 557bb394de6619dd1f360b72333fd2ec7b3defab (patch) | |
tree | b1166a12105d01c92edb528177d24aa5115232e5 /engines/tinsel | |
parent | 69be7476212916b166ac16db41253cd367fb0dcc (diff) | |
download | scummvm-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/tinsel')
-rw-r--r-- | engines/tinsel/bmv.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/sound.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
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) { |