diff options
author | Jamieson Christian | 2003-05-21 06:14:14 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-05-21 06:14:14 +0000 |
commit | 622e3578b4e21927c03311c67d6bdbcbba17e9a6 (patch) | |
tree | b153d0ab83e6877fac280320722f3eea80f0aef3 /sound | |
parent | a318beaa180bb98b49b9023e3eb0ed83fb3e7800 (diff) | |
download | scummvm-rg350-622e3578b4e21927c03311c67d6bdbcbba17e9a6.tar.gz scummvm-rg350-622e3578b4e21927c03311c67d6bdbcbba17e9a6.tar.bz2 scummvm-rg350-622e3578b4e21927c03311c67d6bdbcbba17e9a6.zip |
More Simon music fixes
svn-id: r7769
Diffstat (limited to 'sound')
-rw-r--r-- | sound/midiparser.cpp | 10 | ||||
-rw-r--r-- | sound/midiparser.h | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp index 0432a10ec8..d7bb26a114 100644 --- a/sound/midiparser.cpp +++ b/sound/midiparser.cpp @@ -152,14 +152,18 @@ void MidiParser::resetTracking() { _running_status = 0; } -void MidiParser::setTrack (byte track) { - if (track >= _num_tracks || track == _active_track) - return; +bool MidiParser::setTrack (int track) { + if (track >= _num_tracks) + return false; + else if (track == _active_track) + return true; + resetTracking(); allNotesOff(); _active_track = track; _play_pos = _tracks[track]; parseNextEvent (_next_event); + return true; } void MidiParser::jumpToTick (uint32 tick) { diff --git a/sound/midiparser.h b/sound/midiparser.h index 63d711a640..af459457b6 100644 --- a/sound/midiparser.h +++ b/sound/midiparser.h @@ -106,7 +106,7 @@ public: void setTimerRate (uint32 rate) { _timer_rate = rate / 500; } void onTimer(); - void setTrack (byte track); + bool setTrack (int track); void jumpToTick (uint32 tick); static MidiParser *createParser_SMF(); |