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/queen | |
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/queen')
-rw-r--r-- | engines/queen/sound.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp index b0bc2cf6b6..b03084f7bc 100644 --- a/engines/queen/sound.cpp +++ b/engines/queen/sound.cpp @@ -327,9 +327,8 @@ void SBSound::playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *so uint8 *sound = (uint8 *)malloc(size); if (sound) { f->read(sound, size); - byte flags = Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE; Audio::Mixer::SoundType type = (soundHandle == &_speechHandle) ? Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType; - _mixer->playRaw(type, soundHandle, sound, size, 11840, flags); + _mixer->playRaw(type, soundHandle, sound, size, DisposeAfterUse::YES, 11840, Audio::Mixer::FLAG_UNSIGNED); } } @@ -611,8 +610,7 @@ void AmigaSound::playSound(const char *base) { uint8 *soundData = (uint8 *)malloc(soundSize); if (soundData) { f->read(soundData, soundSize); - byte flags = Audio::Mixer::FLAG_AUTOFREE; - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_sfxHandle, soundData, soundSize, 11025, flags); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_sfxHandle, soundData, soundSize, DisposeAfterUse::YES, 11025, 0); } } } |