aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTravis Howell2006-03-19 05:15:49 +0000
committerTravis Howell2006-03-19 05:15:49 +0000
commit6632a4df53bd6cd94d85057ceae10f14108a67e4 (patch)
treecb6f9737bd9b3f1abe88a0565b585d16de48b023 /sound
parent8ae4dd6caa4bcca13503d6a024e4ca5d75ff4808 (diff)
downloadscummvm-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 'sound')
-rw-r--r--sound/wave.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/wave.cpp b/sound/wave.cpp
index f6ba3fed27..fdb358a1a9 100644
--- a/sound/wave.cpp
+++ b/sound/wave.cpp
@@ -111,7 +111,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
// Prepare the return values.
rate = samplesPerSec;
- flags = Audio::Mixer::FLAG_AUTOFREE;
+ flags = 0;
if (bitsPerSample == 8) // 8 bit data is unsigned
flags |= Audio::Mixer::FLAG_UNSIGNED;
else if (bitsPerSample == 16) // 16 bit data is signed little endian
@@ -164,6 +164,8 @@ AudioStream *makeWAVStream(Common::SeekableReadStream &stream) {
if (!loadWAVFromStream(stream, size, rate, flags, &type))
return 0;
+ flags |= Audio::Mixer::FLAG_AUTOFREE;
+
if (type == 17) // IMA ADPCM
return makeADPCMStream(&stream, size, kADPCMIma, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1);