diff options
author | Torbjörn Andersson | 2006-02-03 20:19:01 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-02-03 20:19:01 +0000 |
commit | 37e204e3a54067118d929991b21ea72abc2d97a0 (patch) | |
tree | a477e9ecdc16c9df8bf736c53db45a91a8c521cf /sword2 | |
parent | 48094b82834eb5568ac16096c5d6f16d554f0112 (diff) | |
download | scummvm-rg350-37e204e3a54067118d929991b21ea72abc2d97a0.tar.gz scummvm-rg350-37e204e3a54067118d929991b21ea72abc2d97a0.tar.bz2 scummvm-rg350-37e204e3a54067118d929991b21ea72abc2d97a0.zip |
A recent change to loadWAVFromStream() caused the AUTOFREE flag to be set,
which in turn causes Broken Sword 2 to crash. And that change made it into
0.8.1, too. Augh! Kudos to wjp for tracking down the bug while I was still
waiting for ScummVM to finish compiling.
svn-id: r20358
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/sound.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sword2/sound.cpp b/sword2/sound.cpp index a84d7324e1..6ee3ef87b9 100644 --- a/sword2/sound.cpp +++ b/sword2/sound.cpp @@ -268,6 +268,13 @@ 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; |