diff options
author | Max Horn | 2004-02-22 14:11:16 +0000 |
---|---|---|
committer | Max Horn | 2004-02-22 14:11:16 +0000 |
commit | aa6ec62e9db78db12912d0e48025241c5d7ef4f7 (patch) | |
tree | 0afae2b795f07b9bd1c00dc75af3dca3864dac5f /sword1/animation.cpp | |
parent | 6db3a8819e7ef847f6aefac8e40f542cad006481 (diff) | |
download | scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.tar.gz scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.tar.bz2 scummvm-rg350-aa6ec62e9db78db12912d0e48025241c5d7ef4f7.zip |
Patch #885904 (Flac Support) with some tweaks by me
svn-id: r12984
Diffstat (limited to 'sword1/animation.cpp')
-rw-r--r-- | sword1/animation.cpp | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/sword1/animation.cpp b/sword1/animation.cpp index 00e5658dc2..960e8f8306 100644 --- a/sword1/animation.cpp +++ b/sword1/animation.cpp @@ -21,11 +21,9 @@ #include "common/stdafx.h" #include "common/file.h" -#include "sound/vorbis.h" -#include "sound/mp3.h" - #include "sword1/animation.h" + #define MOVIE_WIDTH 640 #define MOVIE_HEIGHT 400 @@ -139,24 +137,13 @@ bool AnimationState::init(const char *name) { ticks = _sys->get_msecs(); /* Play audio - TODO: Sync with video?*/ - sndfile = new File; - -#ifdef USE_VORBIS - sprintf(tempFile, "%s.ogg", name); - if (sndfile->open(tempFile)) - bgSoundStream = makeVorbisStream(sndfile, sndfile->size()); -#endif - -#ifdef USE_MAD - if (!sndfile->isOpen()) { - sprintf(tempFile, "%s.mp3", name); - if (sndfile->open(tempFile)) - bgSoundStream = makeMP3Stream(sndfile, sndfile->size()); + sndfile = new File(); + bgSoundStream = AudioStream::openStreamFile(name, sndfile); + if (bgSoundStream != NULL) { + _snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false); + } else { + warning("Cutscene: Could not open Audio Track for %s", name); } -#endif - - if (sndfile->isOpen()) - _snd->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false); return true; #else /* USE_MPEG2 */ |