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/draci | |
| 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/draci')
| -rw-r--r-- | engines/draci/sound.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp index d12fccd27e..d593437cf6 100644 --- a/engines/draci/sound.cpp +++ b/engines/draci/sound.cpp @@ -194,7 +194,6 @@ SndHandle *Sound::getHandle() { void Sound::playSoundBuffer(Audio::SoundHandle *handle, const SoundSample &buffer, int volume, sndHandleType handleType, bool loop) { - // Don't use FLAG_AUTOFREE, because our caching system deletes samples by itself. byte flags = Audio::Mixer::FLAG_UNSIGNED; if (loop) @@ -203,8 +202,9 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, const SoundSample &buffe const Audio::Mixer::SoundType soundType = (handleType == kVoiceHandle) ? Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType; + // Don't use DisposeAfterUse::YES, because our caching system deletes samples by itself. _mixer->playRaw(soundType, handle, buffer._data, - buffer._length, buffer._frequency, flags, -1, volume); + buffer._length, DisposeAfterUse::NO, buffer._frequency, flags, -1, volume); } void Sound::playSound(const SoundSample *buffer, int volume, bool loop) { |
