[Scummvm-cvs-logs] scummvm master -> 56e59aaea60857dc5948641bd55e433e85fdad71
lordhoto
lordhoto at gmail.com
Sat Sep 22 00:00:19 CEST 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
56e59aaea6 AGOS: Rewrite note on events with velocity 0 to note off events in MidiParser_S1D.
Commit: 56e59aaea60857dc5948641bd55e433e85fdad71
https://github.com/scummvm/scummvm/commit/56e59aaea60857dc5948641bd55e433e85fdad71
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-09-21T14:55:26-07:00
Commit Message:
AGOS: Rewrite note on events with velocity 0 to note off events in MidiParser_S1D.
Changed paths:
engines/agos/midiparser_s1d.cpp
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp
index 54f0e9e..bef7199 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
More information about the Scummvm-git-logs
mailing list