Truncate MIDI SysEx messages after termination byte

Johannes Kroll jkroll at lavabit.com
Tue Jan 8 20:12:00 CST 2013


While using the KORG Kontrol Editor software [1] under Wine to configure
my nanoPAD2 MIDI controller, I noticed that uploading parameters to the
hardware doesn't work. The program displays a timeout message.

The program relies on the MIDI driver to remove data after the SysEx
termination byte [2], but the Wine's winmm implementation doesn't do
this. The complete MIDIHDR buffer is sent, including excess bytes in the
case when the buffer is larger than the MIDI message.

The attached patch fixes the problem by truncating SysEx messages after
the termination byte, ignoring any excess bytes.

I tested the patch with KORG Kontrol Editor under Ubuntu 12.04 64-bit
(32-bit wine).

[1] http://www.korg.co.uk/support/downloads/nano2_dl.php
[2] http://home.roadrunner.com/~jgglatt/tech/midispec/sysex.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-terminate-sysex-messages.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130109/99ec65ab/attachment.txt>


More information about the wine-patches mailing list