PortMidi / portmidi

portmidi is a cross-platform MIDI input/output library
Other
116 stars 31 forks source link

pm_mac: handle eox even when multiple small messages are part of one packet #67

Open te-johan opened 4 months ago

te-johan commented 4 months ago

during a midi stress tests i noticed that sometimes sysex messages got stuck in PortMidi. what was specific to the error cases was that there was always a real time event just before the last byte of a sysex message. ie . [0xf0, 0x1d, 0x51, 0xf8, 0xf7]

coremidi sends one packet containing 0xf8 and 0xf7 and the old code did not handle that case correctly.

rbdannenberg commented 4 months ago

Wow, this sounds significant -- great find! This stuff is tricky and amazing this hasn't come up after so many years of use, but maybe sysex is pretty unusual so this is definitely an rare case. I want to look at this carefully and have some other things to merge that I put off due to travel, but I think I can do this within a week. Your contribution, especially taking time to track down the problem, is greatly appreciated.