diff options
author | Scott Thomas | 2011-04-13 22:19:21 +0930 |
---|---|---|
committer | Scott Thomas | 2011-04-13 22:19:21 +0930 |
commit | f54769f9878f32564498bc7c47dfa8db498f52ca (patch) | |
tree | f957668f2554160f0fbabe1f5234b00f8e93c20e /engines | |
parent | 499753cbb86eb6d1506a4cca287443a6768fb5a1 (diff) | |
download | scummvm-rg350-f54769f9878f32564498bc7c47dfa8db498f52ca.tar.gz scummvm-rg350-f54769f9878f32564498bc7c47dfa8db498f52ca.tar.bz2 scummvm-rg350-f54769f9878f32564498bc7c47dfa8db498f52ca.zip |
GROOVIE: Use provided OCReMix song for T7G iOS credits
Diffstat (limited to 'engines')
-rw-r--r-- | engines/groovie/music.cpp | 20 | ||||
-rw-r--r-- | engines/groovie/music.h | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index 3bbac2a570..79b7fe1300 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -33,6 +33,7 @@ #include "common/memstream.h" #include "audio/audiostream.h" #include "audio/midiparser.h" +#include "audio/decoders/mp3.h" #include "audio/decoders/quicktime.h" namespace Groovie { @@ -94,6 +95,7 @@ void MusicPlayer::playCD(uint8 track) { } else if ((track == 98) && (_prevCDtrack == 3)) { // Track 98 is used as a hack to stop the credits song g_system->getAudioCDManager()->stop(); + stopCreditsIOS(); return; } @@ -126,6 +128,8 @@ void MusicPlayer::playCD(uint8 track) { playSong((19 << 10) | 36); // XMI.GJD, file 36 } else if (track == 3) { // TODO: Credits MIDI fallback + if (_vm->getPlatform() == Common::kPlatformIOS) + playCreditsIOS(); } } } @@ -226,6 +230,22 @@ void MusicPlayer::unload() { _isPlaying = false; } +void MusicPlayer::playCreditsIOS() { +#ifdef USE_MAD + Common::File *f = new Common::File(); + f->open("7th_Guest_Dolls_from_Hell_OC_ReMix.mp3"); + Audio::AudioStream *stream = Audio::makeMP3Stream(f, DisposeAfterUse::YES); + _vm->_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_handleCreditsIOS, stream); +#else + warning("MAD library required for credits music"); +#endif +} + +void MusicPlayer::stopCreditsIOS() { +#ifdef USE_MAD + _vm->_system->getMixer()->stopHandle(_handleCreditsIOS); +#endif +} // MusicPlayerMidi diff --git a/engines/groovie/music.h b/engines/groovie/music.h index 8f8aabb0db..2b91cb11eb 100644 --- a/engines/groovie/music.h +++ b/engines/groovie/music.h @@ -63,6 +63,11 @@ private: uint16 _backgroundDelay; + // T7G iOS credits mp3 stream + void playCreditsIOS(); + void stopCreditsIOS(); + Audio::SoundHandle _handleCreditsIOS; + // Volume fading uint32 _fadingStartTime; uint16 _fadingStartVolume; |