[Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.12,1.13

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


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

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

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- animation.cpp	21 Feb 2004 20:00:49 -0000	1.12
+++ animation.cpp	22 Feb 2004 14:11:12 -0000	1.13
@@ -21,11 +21,9 @@
 
 #include "common/stdafx.h"
 #include "common/file.h"
-#include "sound/vorbis.h"
-#include "sound/mp3.h"
-
 #include "sword1/animation.h"
 
+
 #define MOVIE_WIDTH		640
 #define MOVIE_HEIGHT	400
 
@@ -139,24 +137,13 @@
 	ticks = _sys->get_msecs();
 
 	/* Play audio - TODO: Sync with video?*/
-	sndfile = new File;
-
-#ifdef USE_VORBIS
-	sprintf(tempFile, "%s.ogg", name);
-	if (sndfile->open(tempFile)) 
-		bgSoundStream = makeVorbisStream(sndfile, sndfile->size());				
-#endif
-
-#ifdef USE_MAD
-	if (!sndfile->isOpen()) {
-		sprintf(tempFile, "%s.mp3", name);
-		if (sndfile->open(tempFile)) 
-			bgSoundStream = makeMP3Stream(sndfile, sndfile->size());
+	sndfile = new File();
+	bgSoundStream = AudioStream::openStreamFile(name, sndfile);
+	if (bgSoundStream != NULL) {
+		_snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false);
+	} else {
+		warning("Cutscene: Could not open Audio Track for %s", name);
 	}
-#endif
-
-	if (sndfile->isOpen())
-		_snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false);	
 
 	return true;
 #else /* USE_MPEG2 */





More information about the Scummvm-git-logs mailing list