cmMidiOsx.c : Fixed bug in cmMpDeviceSend() where the correct message

byte count was not calculated.
This commit is contained in:
kevin 2013-11-03 11:56:39 -08:00
parent 70fcc2d107
commit 87dd286b98

View File

@ -711,11 +711,13 @@ cmMpRC_t cmMpDeviceSend( unsigned devIdx, unsigned portIdx, cmMidiByte_t status
mpl.numPackets = 1; mpl.numPackets = 1;
mpl.packet[0].timeStamp = 0; 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[0] = status;
mpl.packet[0].data[1] = d0; mpl.packet[0].data[1] = d0;
mpl.packet[0].data[2] = d1; 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 ) if(( err = MIDISend( _cmMpRoot.outPortRef, pp->epr, &mpl)) != noErr )
return _cmMpError(&_cmMpRoot.err,kSysErrMpRC,err,"Send on device:%i port:%i failed.",devIdx,portIdx); return _cmMpError(&_cmMpRoot.err,kSysErrMpRC,err,"Send on device:%i port:%i failed.",devIdx,portIdx);