From 87dd286b985ca17e68c6cbc3f2a8c60de5dc38f3 Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 3 Nov 2013 11:56:39 -0800 Subject: [PATCH] cmMidiOsx.c : Fixed bug in cmMpDeviceSend() where the correct message byte count was not calculated. --- osx/cmMidiOsx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osx/cmMidiOsx.c b/osx/cmMidiOsx.c index fec2f9f..54b0733 100644 --- a/osx/cmMidiOsx.c +++ b/osx/cmMidiOsx.c @@ -711,11 +711,13 @@ cmMpRC_t cmMpDeviceSend( unsigned devIdx, unsigned portIdx, cmMidiByte_t status mpl.numPackets = 1; mpl.packet[0].timeStamp = 0; - mpl.packet[0].length = byteCnt; + mpl.packet[0].length = byteCnt+1; mpl.packet[0].data[0] = status; mpl.packet[0].data[1] = d0; mpl.packet[0].data[2] = d1; + //printf("%i %i %i %i\n",status,d0,d1,byteCnt); + if(( err = MIDISend( _cmMpRoot.outPortRef, pp->epr, &mpl)) != noErr ) return _cmMpError(&_cmMpRoot.err,kSysErrMpRC,err,"Send on device:%i port:%i failed.",devIdx,portIdx);