aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2010-01-19 00:56:29 +0000
committerMax Horn2010-01-19 00:56:29 +0000
commit557bb394de6619dd1f360b72333fd2ec7b3defab (patch)
treeb1166a12105d01c92edb528177d24aa5115232e5 /engines/sword1
parent69be7476212916b166ac16db41253cd367fb0dcc (diff)
downloadscummvm-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/sword1')
-rw-r--r--engines/sword1/sound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index b3671791a1..d3eaad7c5c 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -45,7 +45,7 @@
namespace Sword1 {
#define SOUND_SPEECH_ID 1
-#define SPEECH_FLAGS (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_LITTLE_ENDIAN)
+#define SPEECH_FLAGS (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN)
Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan) {
g_eventRec.registerRandomSource(_rnd, "sword1sound");
@@ -271,7 +271,7 @@ void Sound::playSample(QueueElement *elem) {
flags |= Audio::Mixer::FLAG_STEREO;
if (_fxList[elem->id].type == FX_LOOP)
flags |= Audio::Mixer::FLAG_LOOP;
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, &elem->handle, sampleData + 0x2C, size, 11025, flags, elem->id, volume, pan);
+ _mixer->playRaw(Audio::Mixer::kSFXSoundType, &elem->handle, sampleData + 0x2C, size, DisposeAfterUse::NO, 11025, flags, elem->id, volume, pan);
}
}
} else
@@ -356,7 +356,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
uint32 size;
int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
if (data)
- _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_speechHandle, data, size, 11025, SPEECH_FLAGS, SOUND_SPEECH_ID, speechVol, speechPan);
+ _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_speechHandle, data, size, DisposeAfterUse::YES, 11025, SPEECH_FLAGS, SOUND_SPEECH_ID, speechVol, speechPan);
} else if (_cowMode == CowPSX && sampleSize != 0xffffffff) {
_cowFile.seek(index * 2048);
_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, new Audio::VagStream(_cowFile.readStream(sampleSize)), SOUND_SPEECH_ID, speechVol, speechPan);