Fixed sysEx function

svn-id: r26696
This commit is contained in:
Chris Apers 2007-05-01 09:51:53 +00:00
parent cd6ec5e741
commit 3aee6e3f8e

View File

@ -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() {