1
0
Fork 0

Log unhandled SysEx message in debug mode

This commit is contained in:
Robbert van der Helm 2023-01-31 21:09:05 +01:00
parent 8d9ae19d38
commit ee24e14829

View file

@ -468,7 +468,19 @@ impl<S: SysExMessage> NoteEvent<S> {
// note event parsing however still has higher priority.
match S::from_buffer(midi_data) {
Some(message) => Ok(NoteEvent::MidiSysEx { timing, message }),
None => Err(event_type),
None => {
if event_type == 0xf0 {
if midi_data.len() <= 32 {
nih_trace!("Unhandled MIDI system message: {midi_data:?}");
} else {
nih_trace!("Unhandled MIDI system message of {} bytes", midi_data.len());
}
} else {
nih_trace!("Unhandled MIDI status byte {status_byte:x}");
}
Err(event_type)
}
}
}