瀏覽代碼

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

byte count was not calculated.
master
kevin 11 年之前
父節點
當前提交
87dd286b98
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      osx/cmMidiOsx.c

+ 3
- 1
osx/cmMidiOsx.c 查看文件

@@ -711,11 +711,13 @@ cmMpRC_t  cmMpDeviceSend( unsigned devIdx, unsigned portIdx, cmMidiByte_t status
711 711
 	mpl.numPackets	= 1;
712 712
 	
713 713
 	mpl.packet[0].timeStamp 	= 0;
714
-	mpl.packet[0].length		= byteCnt;
714
+	mpl.packet[0].length		= byteCnt+1;
715 715
 	mpl.packet[0].data[0]		= status;
716 716
 	mpl.packet[0].data[1]		= d0;
717 717
 	mpl.packet[0].data[2]		= d1;
718 718
 
719
+  //printf("%i %i %i %i\n",status,d0,d1,byteCnt);
720
+
719 721
 	if(( err = MIDISend( _cmMpRoot.outPortRef, pp->epr, &mpl)) != noErr )
720 722
 		return _cmMpError(&_cmMpRoot.err,kSysErrMpRC,err,"Send on device:%i port:%i failed.",devIdx,portIdx);
721 723
 	

Loading…
取消
儲存