aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorTravis Howell2007-06-26 05:51:47 +0000
committerTravis Howell2007-06-26 05:51:47 +0000
commit2e3ce7dc8eec143f1e94afbb122923e394f09f3b (patch)
treed494c73e440fa274cdc76e20967da637f18d8f3f /engines/sword1
parent9cee28492d5c7d4beb0763aee138be570c5156c8 (diff)
downloadscummvm-rg350-2e3ce7dc8eec143f1e94afbb122923e394f09f3b.tar.gz
scummvm-rg350-2e3ce7dc8eec143f1e94afbb122923e394f09f3b.tar.bz2
scummvm-rg350-2e3ce7dc8eec143f1e94afbb122923e394f09f3b.zip
Fix FLAC support for speech in Broken Sword 1.
svn-id: r27723
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/sound.cpp5
-rw-r--r--engines/sword1/sword1.cpp20
2 files changed, 17 insertions, 8 deletions
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index a266e5e1a8..492672fad8 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -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 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) {
#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 @@ void Sound::initCowSystem(void) {
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;
}
}
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 3c8abd0953..5633a58f0f 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -355,14 +355,18 @@ const CdFile SwordEngine::_pcCdFileList[] = {
{ "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 @@ const CdFile SwordEngine::_macCdFileList[] = {
{ "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
};