[Scummvm-cvs-logs] SF.net SVN: scummvm: [27723] scummvm/trunk/engines/sword1

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Tue Jun 26 07:51:47 CEST 2007


Revision: 27723
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27723&view=rev
Author:   Kirben
Date:     2007-06-25 22:51:47 -0700 (Mon, 25 Jun 2007)

Log Message:
-----------
Fix FLAC support for speech in Broken Sword 1.

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/sound.cpp
    scummvm/trunk/engines/sword1/sword1.cpp

Modified: scummvm/trunk/engines/sword1/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sound.cpp	2007-06-26 03:25:21 UTC (rev 27722)
+++ scummvm/trunk/engines/sword1/sound.cpp	2007-06-26 05:51:47 UTC (rev 27723)
@@ -33,6 +33,7 @@
 #include "sword1/logic.h"
 #include "sword1/sword1.h"
 
+#include "sound/flac.h"
 #include "sound/mp3.h"
 #include "sound/vorbis.h"
 #include "sound/wave.h"
@@ -200,7 +201,7 @@
 #ifdef USE_FLAC
 		else if (_cowMode == CowFlac) {
 			_cowFile.seek(index);
-			_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
+			_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeFlacStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan);
 			// with compressed audio, we can't calculate the wave volume.
 			// so default to talking.
 			for (int cnt = 0; cnt < 480; cnt++)
@@ -350,7 +351,7 @@
 		sprintf(cowName, "SPEECH%d.CLF", SwordEngine::_systemVars.currentCD);
 		_cowFile.open(cowName);
 		if (_cowFile.isOpen()) {
-			debug(1, "Using Vorbis compressed Speech Cluster");
+			debug(1, "Using Flac compressed Speech Cluster");
 			_cowMode = CowFlac;
 		}
 	}

Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp	2007-06-26 03:25:21 UTC (rev 27722)
+++ scummvm/trunk/engines/sword1/sword1.cpp	2007-06-26 05:51:47 UTC (rev 27723)
@@ -355,14 +355,18 @@
 	{ "cows.mad", FLAG_DEMO },
 	{ "speech1.clu", FLAG_SPEECH1 },
 	 { "speech2.clu", FLAG_SPEECH2 }
-#ifdef USE_MAD
-	,{ "speech1.cl3", FLAG_SPEECH1 },
-	 { "speech2.cl3", FLAG_SPEECH2 }
+#ifdef USE_FLAC
+	,{ "speech1.clf", FLAG_SPEECH1 },
+	 { "speech2.clf", FLAG_SPEECH2 }
 #endif
 #ifdef USE_VORBIS
 	,{ "speech1.clv", FLAG_SPEECH1 },
 	 { "speech2.clv", FLAG_SPEECH2 }
 #endif
+#ifdef USE_MAD
+	,{ "speech1.cl3", FLAG_SPEECH1 },
+	 { "speech2.cl3", FLAG_SPEECH2 }
+#endif
 };
 
 const CdFile SwordEngine::_macCdFileList[] = {
@@ -383,14 +387,18 @@
 	{ "text.clm", FLAG_CD1 | FLAG_DEMO },
 	{ "speech1.clu", FLAG_SPEECH1 },
 	 { "speech2.clu", FLAG_SPEECH2 }
-#ifdef USE_MAD
-	,{ "speech1.cl3", FLAG_SPEECH1 },
-	 { "speech2.cl3", FLAG_SPEECH2 }
+#ifdef USE_FLAC
+	,{ "speech1.clf", FLAG_SPEECH1 },
+	 { "speech2.clf", FLAG_SPEECH2 }
 #endif
 #ifdef USE_VORBIS
 	,{ "speech1.clv", FLAG_SPEECH1 },
 	 { "speech2.clv", FLAG_SPEECH2 }
 #endif
+#ifdef USE_MAD
+	,{ "speech1.cl3", FLAG_SPEECH1 },
+	 { "speech2.cl3", FLAG_SPEECH2 }
+#endif
 };
 
 


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