[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.23,1.24

Max Horn fingolfin at users.sourceforge.net
Sun Feb 22 06:25:03 CET 2004


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

Modified Files:
	animation.cpp 
Log Message:
Patch #885904 (Flac Support) with some tweaks by me

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- animation.cpp	21 Feb 2004 20:00:51 -0000	1.23
+++ animation.cpp	22 Feb 2004 14:11:12 -0000	1.24
@@ -145,24 +145,14 @@
 	ticks = _vm->_system->get_msecs();
 
 	// Play audio
-	sndfile = new File;
-
-#ifdef USE_VORBIS
-	sprintf(tempFile, "%s.ogg", name);
-	if (sndfile->open(tempFile)) 
-		bgSoundStream = makeVorbisStream(sndfile, sndfile->size());				
-#endif
+	sndfile = new File();
+	bgSoundStream = AudioStream::openStreamFile( name, sndfile );
 
-#ifdef USE_MAD
-	if (!sndfile->isOpen()) {
-		sprintf(tempFile, "%s.mp3", name);
-		if (sndfile->open(tempFile)) 
-			bgSoundStream = makeMP3Stream(sndfile, sndfile->size());
+	if (bgSoundStream != NULL) {
+		_vm->_mixer->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false);
+	} else {
+		warning("Cutscene: Could not open Audio Track for %s", name);
 	}
-#endif
-
-	if (sndfile->isOpen())
-		_vm->_mixer->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false);	
 
 	return true;
 #else /* USE_MPEG2 */





More information about the Scummvm-git-logs mailing list