[Scummvm-cvs-logs] SF.net SVN: scummvm: [27511] scummvm/trunk

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Jun 17 16:50:54 CEST 2007


Revision: 27511
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27511&view=rev
Author:   eriktorbjorn
Date:     2007-06-17 07:50:49 -0700 (Sun, 17 Jun 2007)

Log Message:
-----------
Added support for FLAC encoded music in Broken Sword 1. (The compression tool
knows nothing about this, and since they're being rewritten as part of the SoC,
I'm not going to do anything about that.)

Modified Paths:
--------------
    scummvm/trunk/NEWS
    scummvm/trunk/engines/sword1/music.cpp

Modified: scummvm/trunk/NEWS
===================================================================
--- scummvm/trunk/NEWS	2007-06-17 11:16:24 UTC (rev 27510)
+++ scummvm/trunk/NEWS	2007-06-17 14:50:49 UTC (rev 27511)
@@ -1,7 +1,11 @@
 For a more comprehensive changelog for the latest experimental SVN code, see:
         http://scummvm.sourceforge.net/daily/ChangeLog
 
-0.10.0 (????-??-??)
+0.11.0 (????-??-??)
+ Broken Sword 1:
+   - Added support for FLAC encoded music.
+
+0.10.0 (2007-06-20)
  New Games:
    - Added Cinematique evo 1 engine. Currently only Future Wars is supported.
    - Added Touche: The Adventures of the Fifth Musketeer engine.

Modified: scummvm/trunk/engines/sword1/music.cpp
===================================================================
--- scummvm/trunk/engines/sword1/music.cpp	2007-06-17 11:16:24 UTC (rev 27510)
+++ scummvm/trunk/engines/sword1/music.cpp	2007-06-17 14:50:49 UTC (rev 27511)
@@ -31,6 +31,7 @@
 
 #include "sword1/music.h"
 #include "sound/aiff.h"
+#include "sound/flac.h"
 #include "sound/mixer.h"
 #include "sound/mp3.h"
 #include "sound/vorbis.h"
@@ -201,7 +202,19 @@
 bool MusicHandle::play(const char *fileBase, bool loop) {
 	char fileName[30];
 	stop();
-	
+
+#ifdef USE_FLAC
+	if (!_audioSource) {
+		sprintf(fileName, "%s.flac", fileBase);
+		if (_file.open(fileName))
+			_audioSource = Audio::makeFlacStream(&_file, false, 0, 0, loop ? 0 : 1);
+	}
+	if (!_audioSource) {
+		sprintf(fileName, "%s.fla", fileBase);
+		if (_file.open(fileName))
+			_audioSource = Audio::makeFlacStream(&_file, false, 0, 0, loop ? 0 : 1);
+	}
+#endif
 #ifdef USE_VORBIS
 	if (!_audioSource) {
 		sprintf(fileName, "%s.ogg", fileBase);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list