[Scummvm-cvs-logs] SF.net SVN: scummvm: [25837] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Feb 25 00:40:29 CET 2007
Revision: 25837
http://scummvm.svn.sourceforge.net/scummvm/?rev=25837&view=rev
Author: fingolfin
Date: 2007-02-24 15:40:28 -0800 (Sat, 24 Feb 2007)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/trunk/engines/agos/sound.cpp
scummvm/trunk/engines/kyra/sound.cpp
scummvm/trunk/engines/sword1/music.cpp
scummvm/trunk/engines/sword1/sound.cpp
scummvm/trunk/engines/sword2/music.cpp
scummvm/trunk/engines/touche/resource.cpp
scummvm/trunk/sound/audiocd.cpp
Modified: scummvm/trunk/engines/agos/sound.cpp
===================================================================
--- scummvm/trunk/engines/agos/sound.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/engines/agos/sound.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -403,23 +403,23 @@
}
}
#endif
-#ifdef USE_MAD
+#ifdef USE_VORBIS
if (!_hasVoiceFile) {
- sprintf(filename, "%s.mp3", gss->speech_filename);
+ sprintf(filename, "%s.ogg", gss->speech_filename);
file->open(filename);
if (file->isOpen()) {
_hasVoiceFile = true;
- _voice = new MP3Sound(_mixer, file);
+ _voice = new VorbisSound(_mixer, file);
}
}
#endif
-#ifdef USE_VORBIS
+#ifdef USE_MAD
if (!_hasVoiceFile) {
- sprintf(filename, "%s.ogg", gss->speech_filename);
+ sprintf(filename, "%s.mp3", gss->speech_filename);
file->open(filename);
if (file->isOpen()) {
_hasVoiceFile = true;
- _voice = new VorbisSound(_mixer, file);
+ _voice = new MP3Sound(_mixer, file);
}
}
#endif
@@ -471,13 +471,13 @@
char filename[16];
File *file = new File();
-#ifdef USE_MAD
+#ifdef USE_FLAC
if (!_hasEffectsFile) {
- sprintf(filename, "%s.mp3", gss->effects_filename);
+ sprintf(filename, "%s.fla", gss->effects_filename);
file->open(filename);
if (file->isOpen()) {
_hasEffectsFile = true;
- _effects = new MP3Sound(_mixer, file);
+ _effects = new FlacSound(_mixer, file);
}
}
#endif
@@ -491,13 +491,13 @@
}
}
#endif
-#ifdef USE_FLAC
+#ifdef USE_MAD
if (!_hasEffectsFile) {
- sprintf(filename, "%s.fla", gss->effects_filename);
+ sprintf(filename, "%s.mp3", gss->effects_filename);
file->open(filename);
if (file->isOpen()) {
_hasEffectsFile = true;
- _effects = new FlacSound(_mixer, file);
+ _effects = new MP3Sound(_mixer, file);
}
}
#endif
@@ -767,23 +767,23 @@
}
}
#endif
-#ifdef USE_MAD
+#ifdef USE_VORBIS
if (!_hasVoiceFile) {
- sprintf(filename, "%s%d.mp3", gss->speech_filename, disc);
+ sprintf(filename, "%s%d.ogg", gss->speech_filename, disc);
file->open(filename);
if (file->isOpen()) {
_hasVoiceFile = true;
- _voice = new MP3Sound(_mixer, file);
+ _voice = new VorbisSound(_mixer, file);
}
}
#endif
-#ifdef USE_VORBIS
+#ifdef USE_MAD
if (!_hasVoiceFile) {
- sprintf(filename, "%s%d.ogg", gss->speech_filename, disc);
+ sprintf(filename, "%s%d.mp3", gss->speech_filename, disc);
file->open(filename);
if (file->isOpen()) {
_hasVoiceFile = true;
- _voice = new VorbisSound(_mixer, file);
+ _voice = new MP3Sound(_mixer, file);
}
}
#endif
Modified: scummvm/trunk/engines/kyra/sound.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/engines/kyra/sound.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -551,15 +551,15 @@
// static res
const Sound::SpeechCodecs Sound::_supportedCodes[] = {
+#ifdef USE_FLAC
+ { ".VOF", Audio::makeFlacStream },
+#endif // USE_FLAC
+#ifdef USE_VORBIS
+ { ".VOG", Audio::makeVorbisStream },
+#endif // USE_VORBIS
#ifdef USE_MAD
{ ".VO3", Audio::makeMP3Stream },
#endif // USE_MAD
-#ifdef USE_VORBIS
- { ".VOG", Audio::makeVorbisStream },
-#endif // USE_VORBIS
-#ifdef USE_FLAC
- { ".VOF", Audio::makeFlacStream },
-#endif // USE_FLAC
{ 0, 0 }
};
Modified: scummvm/trunk/engines/sword1/music.cpp
===================================================================
--- scummvm/trunk/engines/sword1/music.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/engines/sword1/music.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -133,19 +133,21 @@
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))
_musicMode = MusicWave;
Modified: scummvm/trunk/engines/sword1/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sound.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/engines/sword1/sound.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -333,14 +333,6 @@
/* 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 @@
}
}
#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);
Modified: scummvm/trunk/engines/sword2/music.cpp
===================================================================
--- scummvm/trunk/engines/sword2/music.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/engines/sword2/music.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -53,14 +53,14 @@
const char *ext;
int mode;
} file_types[] = {
- #ifdef USE_MAD
- { "cl3", kMP3Mode },
+ #ifdef USE_FLAC
+ { "clf", kFlacMode },
#endif
#ifdef USE_VORBIS
{ "clg", kVorbisMode },
#endif
- #ifdef USE_FLAC
- { "clf", kFlacMode },
+ #ifdef USE_MAD
+ { "cl3", kMP3Mode },
#endif
{ "clu", kCLUMode }
};
Modified: scummvm/trunk/engines/touche/resource.cpp
===================================================================
--- scummvm/trunk/engines/touche/resource.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/engines/touche/resource.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -45,14 +45,14 @@
};
static const CompressedSpeechFile compressedSpeechFilesTable[] = {
-#ifdef USE_MAD
- { "TOUCHE.SO3", Audio::makeMP3Stream },
+#ifdef USE_FLAC
+ { "TOUCHE.SOF", Audio::makeFlacStream },
#endif
#ifdef USE_VORBIS
{ "TOUCHE.SOG", Audio::makeVorbisStream },
#endif
-#ifdef USE_FLAC
- { "TOUCHE.SOF", Audio::makeFlacStream },
+#ifdef USE_MAD
+ { "TOUCHE.SO3", Audio::makeMP3Stream },
#endif
{ 0, 0 }
};
Modified: scummvm/trunk/sound/audiocd.cpp
===================================================================
--- scummvm/trunk/sound/audiocd.cpp 2007-02-24 23:19:53 UTC (rev 25836)
+++ scummvm/trunk/sound/audiocd.cpp 2007-02-24 23:40:28 UTC (rev 25837)
@@ -49,15 +49,15 @@
static const TrackFormat s_trackFormats[] = {
/* decoderName, openTrackFunction */
+#ifdef USE_FLAC
+ { "Flac", getFlacTrack },
+#endif
#ifdef USE_VORBIS
{ "Ogg Vorbis", getVorbisTrack },
#endif
#ifdef USE_MAD
{ "MPEG Layer 3", getMP3Track },
#endif
-#ifdef USE_FLAC
- { "Flac", getFlacTrack },
-#endif
{ NULL, NULL } // Terminator
};
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