diff options
author | Johannes Schickel | 2012-09-21 23:54:42 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-09-21 23:55:26 +0200 |
commit | 56e59aaea60857dc5948641bd55e433e85fdad71 (patch) | |
tree | bff085959bf004ac352dfabbf7a8e41e80def2eb /engines | |
parent | 23de05926279d4d77ce7fd0830a51b86dd5fde98 (diff) | |
download | scummvm-rg350-56e59aaea60857dc5948641bd55e433e85fdad71.tar.gz scummvm-rg350-56e59aaea60857dc5948641bd55e433e85fdad71.tar.bz2 scummvm-rg350-56e59aaea60857dc5948641bd55e433e85fdad71.zip |
AGOS: Rewrite note on events with velocity 0 to note off events in MidiParser_S1D.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/midiparser_s1d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp index 54f0e9e03b..bef7199a98 100644 --- a/engines/agos/midiparser_s1d.cpp +++ b/engines/agos/midiparser_s1d.cpp @@ -101,6 +101,15 @@ void MidiParser_S1D::parseNextEvent(EventInfo &info) { case 0x9: // note on info.basic.param1 = *_position._playPos++; info.basic.param2 = *_position._playPos++; + // Rewrite note on events with velocity 0 as note off events. + // This is the actual meaning of this, but theoretically this + // should not need to be rewritten, since all MIDI devices should + // interpret it like that. On the other hand all our MidiParser + // implementations do it and there seems to be code in MidiParser + // which relies on this for tracking active notes. + if (info.basic.param2 == 0) { + info.event = info.channel() | 0x80; + } break; case 0xA: { // loop control |