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
This commit is contained in:
Torbjörn Andersson 2006-02-03 20:19:01 +00:00
parent 48094b8283
commit 37e204e3a5

View File

@ -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;