Re: Sysex problems!
Re: Sysex problems!
- Subject: Re: Sysex problems!
- From: "Peter Karlsson" <email@hidden>
- Date: Mon, 07 Jul 2003 11:45:53 +0000
Hi Kurt!
I am using this code to print out the incomming bytes:
static void MyReadProc(const MIDIPacketList *pktlist, void *refCon, void
*connRefCon)
{
int i, j;
MIDIPacket *packet = (MIDIPacket *)pktlist->packet;
for (j=0 ; j < pktlist->numPackets; ++j)
{
for (i = 0; i < packet->length; ++i)
{
NSLog(@"X", packet->data[i]);
*sysex_ptr = packet->data[i];
sysex_ptr+=1;
sysexcounter+=1;
}
packet = MIDIPacketNext(packet);
NSLog(@"MIDIPacketNext");
}
}
And the result is this:
00 // End of good dump
01
F7
MIDIPacketNext
00 // 10 garbage bytes in a separate packet
00
00
00
00
00
00
01
F7
F7
MIDIPacketNext
F0 // start of good dump
41
37
I am parsing sysex now in my app so I don't have this problem anymore, but
it still needs to be corrected.
Peter
From: Kurt Revis <email@hidden>
To: "Peter Karlsson" <email@hidden>
CC: email@hidden
Subject: Re: Sysex problems!
Date: Fri, 4 Jul 2003 12:46:37 -0700
On Thursday, July 3, 2003, at 06:09 AM, Peter Karlsson wrote:
I can't receive 2 sysex dumps after each other without getting 10 garbage
bytes between the 2 dumps.
Forgot to mention: it's odd that you always get exactly 10 bytes of
repeated data. The header of a MIDIPacket is 10 bytes long (it's 8 bytes
timestamp, 2 bytes length, then variable-length data), so perhaps the
driver is doing some pointer math incorrectly at some point? Could just be
a coincidence, but the fact is at least suggestive.
Do you get the 10 bytes of garbage all at once in a separate packet or
packet list, or is it attached to a "good" packet or packet list? You may
want to change your code to print out the timestamps and boundaries of
packets/packet lists as well.
--
Kurt Revis
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.