File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -483,24 +483,22 @@ inline bool MidiInterface<SerialPort>::read(Channel inChannel)
483
483
if (inChannel >= MIDI_CHANNEL_OFF)
484
484
return false ; // MIDI Input disabled.
485
485
486
- if (parse ())
487
- {
488
- handleNullVelocityNoteOnAsNoteOff ();
489
- if (inputFilter (inChannel))
490
- {
486
+ if (!parse ())
487
+ return false ;
491
488
492
- #if (MIDI_BUILD_OUTPUT && MIDI_BUILD_THRU)
493
- thruFilter (inChannel);
494
- #endif
489
+ handleNullVelocityNoteOnAsNoteOff ();
490
+ const bool channelMatch = inputFilter (inChannel);
495
491
496
- #if MIDI_USE_CALLBACKS
497
- launchCallback ();
498
- #endif
499
- return true ;
500
- }
492
+ if (MIDI_USE_CALLBACKS && channelMatch)
493
+ {
494
+ launchCallback ();
501
495
}
502
496
503
- return false ;
497
+ #if MIDI_BUILD_THRU
498
+ thruFilter (inChannel);
499
+ #endif
500
+
501
+ return channelMatch;
504
502
}
505
503
506
504
// -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments