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 /sword2/driver | |
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 'sword2/driver')
-rw-r--r-- | sword2/driver/animation.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp index 1cd2def9f5..31a008cab9 100644 --- a/sword2/driver/animation.cpp +++ b/sword2/driver/animation.cpp @@ -145,24 +145,14 @@ bool AnimationState::init(const char *name) { ticks = _vm->_system->get_msecs(); // Play audio - sndfile = new File; + sndfile = new File(); + bgSoundStream = AudioStream::openStreamFile( name, sndfile ); -#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()); + if (bgSoundStream != NULL) { + _vm->_mixer->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false); + } else { + warning("Cutscene: Could not open Audio Track for %s", name); } -#endif - - if (sndfile->isOpen()) - _vm->_mixer->playInputStream(&bgSound, bgSoundStream, false, 255, 0, -1, false); return true; #else /* USE_MPEG2 */ |