diff options
author | Filippos Karapetis | 2009-08-17 18:25:51 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-08-17 18:25:51 +0000 |
commit | 4a4ae3382501da9fbd9dc25f502336d55308ca5f (patch) | |
tree | 29a2015ae581c293b7619a3f7f88b5778170dca6 | |
parent | 4b9bfe2013b3b6da5e34326e3bbdb3795539f94b (diff) | |
download | scummvm-rg350-4a4ae3382501da9fbd9dc25f502336d55308ca5f.tar.gz scummvm-rg350-4a4ae3382501da9fbd9dc25f502336d55308ca5f.tar.bz2 scummvm-rg350-4a4ae3382501da9fbd9dc25f502336d55308ca5f.zip |
Put back the code for playing external digital music, used by the MIDI enhancement project, which was removed in rev. #43480
svn-id: r43485
-rw-r--r-- | engines/saga/music.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 1e2a404a62..8ca946a127 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -271,11 +271,25 @@ void Music::play(uint32 resourceId, MusicFlags flags) { realTrackNumber = resourceId + 1; } + // Try to open standalone digital track + char trackName[2][16]; + sprintf(trackName[0], "track%d", realTrackNumber); + sprintf(trackName[1], "track%02d", realTrackNumber); + Audio::AudioStream *stream = 0; + for (int i = 0; i < 2; ++i) { + stream = Audio::AudioStream::openStreamFile(trackName[i], 0, 0, (flags == MUSIC_LOOP) ? 0 : 1); + if (stream) { + _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream); + _digitalMusic = true; + return; + } + } + if (_vm->getGameId() == GID_ITE) { if (resourceId >= 9 && resourceId <= 34) { if (_digitalMusicContext != NULL) { loopStart = 0; - // fix ITE sunstatm/sunspot score + // Fix ITE sunstatm/sunspot score if (resourceId == MUSIC_SUNSPOT) loopStart = 4 * 18727; |