aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/wave.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/wave.cpp b/sound/wave.cpp
index bd3c2aed05..c3bb12b1cf 100644
--- a/sound/wave.cpp
+++ b/sound/wave.cpp
@@ -110,7 +110,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
// Prepare the return values.
rate = samplesPerSec;
- flags = 0;
+ flags = Audio::Mixer::FLAG_AUTOFREE;
if (bitsPerSample == 8) // 8 bit data is unsigned
flags |= Audio::Mixer::FLAG_UNSIGNED;
else if (bitsPerSample == 16) // 16 bit data is signed little endian
@@ -169,7 +169,6 @@ AudioStream *makeWAVStream(Common::SeekableReadStream &stream) {
byte *data = (byte *)malloc(size);
assert(data);
stream.read(data, size);
- flags |= Audio::Mixer::FLAG_AUTOFREE;
return makeLinearInputStream(rate, flags, data, size, 0, 0);
}