aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJamieson Christian2003-08-07 23:42:15 +0000
committerJamieson Christian2003-08-07 23:42:15 +0000
commit93c90f46744feb5bc843f8b3fb8f8cf8970fcecc (patch)
treeb59bcb7d75bfbb24a741571c272f05ff7796bd1b /sound
parentf67b126f1dee9e14a28d555f10cd556f173b9e3a (diff)
downloadscummvm-rg350-93c90f46744feb5bc843f8b3fb8f8cf8970fcecc.tar.gz
scummvm-rg350-93c90f46744feb5bc843f8b3fb8f8cf8970fcecc.tar.bz2
scummvm-rg350-93c90f46744feb5bc843f8b3fb8f8cf8970fcecc.zip
Fix for Bug [780924] IMUSE: Pitchbend isn't reset when changing tracks
When scanning (not jumping) to a target location in a different track, the current track is first scanned to the end to update the player state before starting into the new track. Miscellaneous scan-related cleanup is included. svn-id: r9589
Diffstat (limited to 'sound')
-rw-r--r--sound/midiparser.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp
index 0b2408f4cf..4f16e5b72b 100644
--- a/sound/midiparser.cpp
+++ b/sound/midiparser.cpp
@@ -330,19 +330,14 @@ bool MidiParser::jumpToTick (uint32 tick, bool fireEvents) {
if (info.event == 0xFF) {
if (info.ext.type == 0x2F) { // End of track
- if (_autoLoop) {
- _position._play_pos = _tracks[_active_track];
- parseNextEvent (_next_event);
- } else {
- _position = currentPos;
- _next_event = currentEvent;
- return false;
- }
- break;
- } else if (info.ext.type == 0x51) { // Tempo
- if (info.length >= 3) {
+ _position = currentPos;
+ _next_event = currentEvent;
+ return false;
+ } else {
+ if (info.ext.type == 0x51 && info.length >= 3) // Tempo
setTempo (info.ext.data[0] << 16 | info.ext.data[1] << 8 | info.ext.data[2]);
- }
+ if (fireEvents)
+ _driver->metaEvent (info.ext.type, info.ext.data, (uint16) info.length);
}
} else if (fireEvents) {
if (info.event == 0xF0)