diff options
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | engines/sword1/music.cpp | 15 |
2 files changed, 19 insertions, 2 deletions
@@ -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. diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp index 67a390802b..ebff7f9929 100644 --- a/engines/sword1/music.cpp +++ b/engines/sword1/music.cpp @@ -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 @@ int AiffAudioStream::readBuffer(int16 *buffer, const int numSamples) { 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); |