diff options
author | Filippos Karapetis | 2010-11-24 15:12:43 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-24 15:12:43 +0000 |
commit | 1ebae78ff199385d451f844deef19ebf6b8e611e (patch) | |
tree | 9fe43d00a76b86c65149c46e03675b5e923a29e1 /sound/midiparser.cpp | |
parent | 9493b9add55e1254ad56b4ffdf8b076b22c08546 (diff) | |
download | scummvm-rg350-1ebae78ff199385d451f844deef19ebf6b8e611e.tar.gz scummvm-rg350-1ebae78ff199385d451f844deef19ebf6b8e611e.tar.bz2 scummvm-rg350-1ebae78ff199385d451f844deef19ebf6b8e611e.zip |
SCI/SOUND: Applied patch #3117577 - "SCI: MT-32 plays "warble" of notes when music resumes", with some slight modifications
This is only used by SCI for now, but it is probably correct to apply this for
all engines, thus an appropriate TODO has been added
svn-id: r54460
Diffstat (limited to 'sound/midiparser.cpp')
-rw-r--r-- | sound/midiparser.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp index 929b1d8b12..6559e07468 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 { + 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 + + // TODO: this is currently done by SCI only, but it seems sensible enough to do this + // for all engines + } else { + sendToDriver(info.event, info.basic.param1, info.basic.param2); + } + } } parseNextEvent(_next_event); |