From 3aee6e3f8e50f249ad2a57d348c8bc6b5a50d45a Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Tue, 1 May 2007 09:51:53 +0000 Subject: Fixed sysEx function svn-id: r26696 --- backends/midi/zodiac.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index e626db687e..703c7dbf20 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -110,12 +110,13 @@ void MidiDriver_Zodiac::send(uint32 b) { } void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { -FIXME: We may have to add the 0xF0 / 0xF7 frame here. -Or not -- maybe TwMidiSysEx doesn't expect it either. -But since I couldn't find any documentation on this API, -I'll leave it to the porter to decide that. -- Fingolfin + unsigned char buf[256]; + + buf[0] = 0xF0; + memcpy(buf + 1, msg, length); + buf[length + 1] = 0xF7; - TwMidiSysEx(_midiHandle, 0, (byte *)msg, length); + TwMidiSysEx(_midiHandle, 0, (byte *)buf, length + 2); } MidiDriver *MidiDriver_Zodiac_create() { -- cgit v1.2.3