aboutsummaryrefslogtreecommitdiff
path: root/sound/midiparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/midiparser.cpp')
-rw-r--r--sound/midiparser.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp
index 929b1d8b12..465d4dedea 100644
--- a/sound/midiparser.cpp
+++ b/sound/midiparser.cpp
@@ -361,7 +361,7 @@ void MidiParser::hangAllActiveNotes() {
}
}
-bool MidiParser::jumpToTick(uint32 tick, bool fireEvents, bool stopNotes) {
+bool MidiParser::jumpToTick(uint32 tick, bool fireEvents, bool stopNotes, bool dontSendNoteOn) {
if (_active_track >= _num_tracks)
return false;
@@ -402,8 +402,17 @@ bool MidiParser::jumpToTick(uint32 tick, bool fireEvents, bool stopNotes) {
_driver->sysEx(info.ext.data, (uint16)info.length-1);
else
_driver->sysEx(info.ext.data, (uint16)info.length);
- } else
- sendToDriver(info.event, info.basic.param1, info.basic.param2);
+ } else {
+ // The note on sending code is used by the SCUMM engine. Other engine using this code
+ // (such as SCI) have issues with this, as all the notes sent can be heard when a song
+ // is fast-forwarded. Thus, if the engine requests it, don't send note on events.
+ if (info.command() == 0x9 && dontSendNoteOn) {
+ // Don't send note on; doing so creates a "warble" with some instruments on the MT-32.
+ // Refer to patch #3117577
+ } else {
+ sendToDriver(info.event, info.basic.param1, info.basic.param2);
+ }
+ }
}
parseNextEvent(_next_event);