https://bugs.winehq.org/show_bug.cgi?id=51979
Bug ID: 51979 Summary: Sending of Midi SysEx Events not working Product: Wine Version: 6.20 Hardware: x86-64 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: reinhold.hoffmann@hotmail.com
The sending of midi SysEx events to an external device like a keyboard fails. SysEx events are very common like all the midi reset events.
Component: dlls\winecoreaudio.drv File: midi.c
This is related to coreaudio, alsa is OK.ยด
The issue is that SysEx events are encapsulated by 0xF0, 0xF7. These encapsulated bytes are stripped before the routine MIDIOut_LongData is called.
In MIDIOut_LongData the following happens:
Warning "The allegedly system exclusive buffer is not correct. Please report with MIDI file" Errors "Add missing 0xF0 marker at the beginning of system exclusive byte stream" "Add missing 0xF7 marker at the end of system exclusive byte stream"
But the event is being sent to the external port as if the encapsulated bytes would exist. I use a Yamaha keyboard. This macOS driver has been recently upgraded for macOS Big Sur, Monterey. This driver now fails.
================================
Comparing the same situation for the alsa driver
Component: dlls\winealsa.drv File: midi.c
The equivalent to MIDIOut_LongData of coreaudio here is modLongData. In modLongData the encapsulated bytes are added in case they are missing.
I recommend to add the same tolerant step to MIDIOut_LongData as well.
Unfortunately, tracing of a midi file was not possible because both routines crash when trace is active for dwBufferLength=2 which is a regular case even for long midi data.
Further, there is a comment in both files "but it seems to be used only for midi input". This is not the case. LongData are used for midi out, too.