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/agos | |
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/agos')
-rw-r--r-- | engines/agos/sound.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 4d79f4fed3..5b9257b068 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -277,7 +277,7 @@ void RawSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ byte *buffer = (byte *)malloc(size); assert(buffer); _file->read(buffer, size); - _mixer->playRaw(type, handle, buffer, size, 22050, flags | Audio::Mixer::FLAG_AUTOFREE); + _mixer->playRaw(type, handle, buffer, size, DisposeAfterUse::YES, 22050, flags); } #ifdef USE_MAD @@ -740,10 +740,10 @@ void Sound::playRawData(byte *soundData, uint sound, uint size, uint freq) { byte *buffer = (byte *)malloc(size); memcpy(buffer, soundData, size); + byte flags = 0; if (_vm->getPlatform() == Common::kPlatformPC) - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_effectsHandle, buffer, size, freq, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE); - else - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_effectsHandle, buffer, size, freq, Audio::Mixer::FLAG_AUTOFREE); + flags = Audio::Mixer::FLAG_UNSIGNED; + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_effectsHandle, buffer, size, DisposeAfterUse::YES, freq, flags); } // Feeble Files specific |