[Scummvm-cvs-logs] CVS: scummvm/sword2 sound.cpp,1.67,1.68
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Fri Feb 3 12:20:19 CET 2006
Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20078
Modified Files:
sound.cpp
Log Message:
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.
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sound.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- sound.cpp 18 Jan 2006 17:39:54 -0000 1.67
+++ sound.cpp 3 Feb 2006 20:19:01 -0000 1.68
@@ -268,6 +268,13 @@
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;
More information about the Scummvm-git-logs
mailing list