[Scummvm-cvs-logs] CVS: scummvm/sword2 sound.cpp,1.62.2.3,1.62.2.4

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Fri Feb 3 12:39:02 CET 2006


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28782

Modified Files:
      Tag: branch-0-8-0
	sound.cpp 
Log Message:
Backported fix for last-minute BS2 regression.


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/sound.cpp,v
retrieving revision 1.62.2.3
retrieving revision 1.62.2.4
diff -u -d -r1.62.2.3 -r1.62.2.4
--- sound.cpp	18 Jan 2006 18:07:41 -0000	1.62.2.3
+++ sound.cpp	3 Feb 2006 20:38:07 -0000	1.62.2.4
@@ -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