[Scummvm-cvs-logs] CVS: scummvm/graphics animation.cpp,1.7,1.8 animation.h,1.7,1.8

Max Horn fingolfin at users.sourceforge.net
Mon Jun 28 15:36:03 CEST 2004


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

Modified Files:
	animation.cpp animation.h 
Log Message:
Make use of new File refcount code; also fixed long standing bug in vorbis code (ov_clear was not being called, resulting in a file not being closed)

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- animation.cpp	28 Mar 2004 16:30:48 -0000	1.7
+++ animation.cpp	28 Jun 2004 22:35:20 -0000	1.8
@@ -36,13 +36,11 @@
 	if (decoder)
 		mpeg2_close(decoder);
 	delete mpgfile;
-	delete sndfile;
 #ifndef BACKEND_8BIT
 	_sys->hideOverlay();
 	free(overlay);
 #endif
-	if (bgSoundStream)
-		delete bgSoundStream;
+	delete bgSoundStream;
 #endif
 }
 
@@ -53,7 +51,6 @@
 
 	decoder = NULL;
 	mpgfile = NULL;
-	sndfile = NULL;
 	bgSoundStream = NULL;
 
 #ifdef BACKEND_8BIT
@@ -132,8 +129,7 @@
 	ticks = _sys->get_msecs();
 
 	// Play audio
-	sndfile = new File();
-	bgSoundStream = AudioStream::openStreamFile(name, sndfile);
+	bgSoundStream = AudioStream::openStreamFile(name);
 
 	if (bgSoundStream != NULL) {
 		_snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false);

Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- animation.h	24 Mar 2004 11:16:34 -0000	1.7
+++ animation.h	28 Jun 2004 22:35:20 -0000	1.8
@@ -90,7 +90,6 @@
 #endif
 
 	File *mpgfile;
-	File *sndfile;
 
 	byte buffer[BUFFER_SIZE];
 





More information about the Scummvm-git-logs mailing list