aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2007-02-24 23:40:28 +0000
committerMax Horn2007-02-24 23:40:28 +0000
commitb3931a847d21b0770f7b30bd1e4c793dc283abf3 (patch)
tree07d97cf6a807d684f307fd81867f275e1ac89a42 /engines/sword1
parent65b30d84a805a7b22322474970a219d5628997d5 (diff)
downloadscummvm-rg350-b3931a847d21b0770f7b30bd1e4c793dc283abf3.tar.gz
scummvm-rg350-b3931a847d21b0770f7b30bd1e4c793dc283abf3.tar.bz2
scummvm-rg350-b3931a847d21b0770f7b30bd1e4c793dc283abf3.zip
Trying to unify the order in which we try the various audio formats: Prefer FLAC (lossless) over Ogg Vorbis ('free') over MP3 -- the order is admittedly somewhat arbitrary, but at least now it's consistent across all parts of ScummVM
svn-id: r25837
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/music.cpp14
-rw-r--r--engines/sword1/sound.cpp16
2 files changed, 16 insertions, 14 deletions
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 6e3a540b8e..333c465705 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -133,18 +133,20 @@ bool MusicHandle::play(const char *fileBase, bool loop) {
char fileName[30];
stop();
_musicMode = MusicNone;
-#ifdef USE_MAD
- sprintf(fileName, "%s.mp3", fileBase);
- if (_file.open(fileName))
- _musicMode = MusicMp3;
-#endif
#ifdef USE_VORBIS
- if (!_file.isOpen()) { // mp3 doesn't exist (or not compiled with MAD support)
+ if (!_file.isOpen()) {
sprintf(fileName, "%s.ogg", fileBase);
if (_file.open(fileName))
_musicMode = MusicVorbis;
}
#endif
+#ifdef USE_MAD
+ if (!_file.isOpen()) {
+ sprintf(fileName, "%s.mp3", fileBase);
+ if (_file.open(fileName))
+ _musicMode = MusicMp3;
+ }
+#endif
if (!_file.isOpen()) {
sprintf(fileName, "%s.wav", fileBase);
if (_file.open(fileName))
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 42107ae6b1..ce43230f17 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -333,14 +333,6 @@ void Sound::initCowSystem(void) {
/* look for speech1/2.clu in the data dir
and speech/speech.clu (running from cd or using cd layout)
*/
-#ifdef USE_MAD
- sprintf(cowName, "SPEECH%d.CL3", SwordEngine::_systemVars.currentCD);
- _cowFile.open(cowName);
- if (_cowFile.isOpen()) {
- debug(1, "Using MP3 compressed Speech Cluster");
- _cowMode = CowMp3;
- }
-#endif
#ifdef USE_VORBIS
if (!_cowFile.isOpen()) {
sprintf(cowName, "SPEECH%d.CLV", SwordEngine::_systemVars.currentCD);
@@ -351,6 +343,14 @@ void Sound::initCowSystem(void) {
}
}
#endif
+#ifdef USE_MAD
+ sprintf(cowName, "SPEECH%d.CL3", SwordEngine::_systemVars.currentCD);
+ _cowFile.open(cowName);
+ if (_cowFile.isOpen()) {
+ debug(1, "Using MP3 compressed Speech Cluster");
+ _cowMode = CowMp3;
+ }
+#endif
if (!_cowFile.isOpen()) {
sprintf(cowName, "SPEECH%d.CLU", SwordEngine::_systemVars.currentCD);
_cowFile.open(cowName);