I have a thread polling the midi input for data. It set to store Sysex messages to a Byte array. The problem is my Received Sysex messages get cut off at byte 76.




void process_midi(PtTimestamp timestamp, LPVOID pParam )

{

     int data = 0;



     if (inputFlag){

           result = Pm_Poll(midi);

           if (result) {

if (Pm_Read(midi, &buffer2, 1) == pmBufferOverflow){AfxMessageBox((L"Buffer Overflow")); return; }

                 // unless there was overflow, we should have a message now



//lets just simpily pop up a message box for each byte received.



                 CString temp;

data = (buffer2.message & 0xff); temp.Format(L"%x", data); AfxMessageBox(temp);

data = (buffer2.message >> 8 & 0xff); temp.Format(L"%x", data); AfxMessageBox(temp);

data = (buffer2.message >> 16 & 0xff); temp.Format(L"%x", data); AfxMessageBox(temp);

data = (buffer2.message >> 24 & 0xff); temp.Format(L"%x", data); AfxMessageBox(temp);

           }

     }

}







I’m sending this…



F0 7F 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 F7 F0 7F 01 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 00 09 00 00 00 00 00 0E 08 00 03 00 00 00 02 00 04 00 00 00 00 0E 08 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F7





Everything comes in perfect until I get to Byte 76 and the rest is cutt off. (no more data).

I’ve tried increasing the input device buffer.. no effect.. 0 works the same as 9999 …

Any Ideas ?

_________________________________________________________________
Discover sweet stuff waiting for you at the Messenger Cafe.  Claim your treat today! http://www.cafemessenger.com/info/info_sweetstuff.html?ocid=TXT_TAGHM_SeptHMtagline2

_______________________________________________
media_api mailing list
[email protected]
http://www.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to