diff options
author | Travis Howell | 2006-03-19 05:15:49 +0000 |
---|---|---|
committer | Travis Howell | 2006-03-19 05:15:49 +0000 |
commit | 6632a4df53bd6cd94d85057ceae10f14108a67e4 (patch) | |
tree | cb6f9737bd9b3f1abe88a0565b585d16de48b023 /engines | |
parent | 8ae4dd6caa4bcca13503d6a024e4ca5d75ff4808 (diff) | |
download | scummvm-rg350-6632a4df53bd6cd94d85057ceae10f14108a67e4.tar.gz scummvm-rg350-6632a4df53bd6cd94d85057ceae10f14108a67e4.tar.bz2 scummvm-rg350-6632a4df53bd6cd94d85057ceae10f14108a67e4.zip |
Revert FLAG_AUTOFREE changes to loadWAVFromStreammakeWAVStream
svn-id: r21376
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/sound.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/sound.cpp | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/engines/simon/sound.cpp b/engines/simon/sound.cpp index f40a164a12..b3a7b54502 100644 --- a/engines/simon/sound.cpp +++ b/engines/simon/sound.cpp @@ -136,9 +136,11 @@ void WavSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) { error("playSound: Not a valid WAV file"); } + flags |= Audio::Mixer::FLAG_AUTOFREE | wavFlags; + byte *buffer = (byte *)malloc(size); _file->read(buffer, size); - _mixer->playRaw(handle, buffer, size, rate, flags | wavFlags); + _mixer->playRaw(handle, buffer, size, rate, flags); } void VocSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) { diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp index 4e093d2a38..202a563fbb 100644 --- a/engines/sword2/sound.cpp +++ b/engines/sword2/sound.cpp @@ -270,13 +270,6 @@ int32 Sound::playFx(Audio::SoundHandle *handle, byte *data, uint32 len, uint8 vo return RDERR_INVALIDWAV; } - // The resource manager must have complete control over when resources - // are freed, or reference counting will break horribly. Besides, the - // data pointer is not valid for passing to free(). Why the hell is the - // AUTOFREE flag set by default anyway? - - flags &= ~Audio::Mixer::FLAG_AUTOFREE; - if (isReverseStereo()) flags |= Audio::Mixer::FLAG_REVERSE_STEREO; |