diff options
author | Filippos Karapetis | 2011-10-22 12:41:51 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-20 22:43:12 +0100 |
commit | 1bddee1e7382ca28e55082b61a0e0a698a815eca (patch) | |
tree | 76d628993b292beaa2329341366f270716daa352 /engines/toltecs | |
parent | 14cbfd4607f0fa30dff8a7d5eb7a5caad060bc13 (diff) | |
download | scummvm-rg350-1bddee1e7382ca28e55082b61a0e0a698a815eca.tar.gz scummvm-rg350-1bddee1e7382ca28e55082b61a0e0a698a815eca.tar.bz2 scummvm-rg350-1bddee1e7382ca28e55082b61a0e0a698a815eca.zip |
TOLTECS: Fixed music looping
Diffstat (limited to 'engines/toltecs')
-rw-r--r-- | engines/toltecs/music.cpp | 4 | ||||
-rw-r--r-- | engines/toltecs/music.h | 7 | ||||
-rw-r--r-- | engines/toltecs/script.cpp | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/engines/toltecs/music.cpp b/engines/toltecs/music.cpp index 84cb2f7148..ef44421de9 100644 --- a/engines/toltecs/music.cpp +++ b/engines/toltecs/music.cpp @@ -50,7 +50,7 @@ void MusicPlayer::send(uint32 b) { Audio::MidiPlayer::send(b); } -void MusicPlayer::playMIDI(const byte *data, uint32 size, MusicFlags flags) { +void MusicPlayer::playMIDI(const byte *data, uint32 size, bool loop) { Common::StackLock lock(_mutex); stopAndClear(); @@ -76,7 +76,7 @@ void MusicPlayer::playMIDI(const byte *data, uint32 size, MusicFlags flags) { setVolume(127); - _isLooping = flags & MUSIC_LOOP; + _isLooping = loop; _isPlaying = true; } else { delete parser; diff --git a/engines/toltecs/music.h b/engines/toltecs/music.h index 45238213d8..c7189e89d6 100644 --- a/engines/toltecs/music.h +++ b/engines/toltecs/music.h @@ -29,16 +29,11 @@ namespace Toltecs { -enum MusicFlags { - MUSIC_NORMAL = 0, - MUSIC_LOOP = 1 -}; - class MusicPlayer : public Audio::MidiPlayer { public: MusicPlayer(bool isGM = true); - void playMIDI(const byte *data, uint32 size, MusicFlags flags = MUSIC_NORMAL); + void playMIDI(const byte *data, uint32 size, bool loop = false); void pause(); void resume(); void stopAndClear(); diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp index 91a3f36e83..d95ac0ec06 100644 --- a/engines/toltecs/script.cpp +++ b/engines/toltecs/script.cpp @@ -1050,8 +1050,8 @@ void ScriptInterpreter::sfStartSequence() { _vm->_arc->closeResource(); if (!memcmp(data, "FORM", 4)) { - // TODO: Looping flag - _vm->_musicPlayer->playMIDI(data, resourceSize); + // TODO: It seems that music is always looping? + _vm->_musicPlayer->playMIDI(data, resourceSize, true); } else { // TODO: Where does this occur? Are these SMF MIDI files? warning("sfStartSequence: resource %d isn't XMIDI", sequenceResIndex); |