[PATCH] winealsa.drv: Fix handling of system real time MIDI messages
Andrew Eikum
aeikum at codeweavers.com
Tue Feb 7 09:03:42 CST 2017
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Tue, Jan 31, 2017 at 04:16:17AM -0200, Bruno Jesus wrote:
> MIDI spec at http://www.somascape.org/midi/tech/spec.html state that system real time messages "... are each single byte messages, with no following data bytes...", currently wine is prepending SYSEX header generating invalid messages.
>
> A comparison before and after patch using gmidimonitor as ouput MIDI port:
> http://alexa.pro.br/~bruno/wine/midi.png
>
> I believe the patch to be correct, I don't own any MIDI hardware to test but gmidimonitor seems good enough.
>
> Fixes bug https://bugs.winehq.org/show_bug.cgi?id=39048
>
> Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
> ---
> dlls/winealsa.drv/midi.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
> index 6fc75ee..6ef1976 100644
> --- a/dlls/winealsa.drv/midi.c
> +++ b/dlls/winealsa.drv/midi.c
> @@ -909,10 +909,15 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
> case 0x0B: /* Continue */
> case 0x0C: /* Stop */
> case 0x0E: /* Active Sensing. */
> - /* FIXME: Is this function suitable for these purposes
> - (and also Song Select and Song Position Pointer) */
> - snd_seq_ev_set_sysex(&event, 1, &evt);
> + {
> + snd_midi_event_t *midi_event;
> +
> + snd_midi_event_new(1, &midi_event);
> + snd_midi_event_init(midi_event);
> + snd_midi_event_encode_byte(midi_event, evt, &event);
> + snd_midi_event_free(midi_event);
> break;
> + }
> case 0x0F: /* Reset */
> /* snd_seq_ev_set_sysex(&event, 1, &evt);
> this other way may be better */
> --
> 2.9.3
>
>
>
More information about the wine-patches
mailing list