Re: Midi sysex request in new thread
Re: Midi sysex request in new thread
- Subject: Re: Midi sysex request in new thread
- From: Pete Gontier <email@hidden>
- Date: Fri, 17 Dec 2004 17:27:09 -0800
circa 12/17/04 10:18 AM, "Doug Wyatt" <email@hidden> wrote:
>> It sounds like you are trying to receive a
>> large sysex message. The driver is trying to avoid sending you every byte as
>> it's received from USB (actually, they arrive in chunks of 1 to 12, but
>> that's neither here nor there). It's accumulating bytes into a non-small
>> buffer (say for the sake of discussion it's 256 bytes long because I can't
>> remember). When the message ends OR the buffer fills, then the driver sends
>> the buffer up to CoreMIDI. In theory, this is supposed to reduce overhead,
>> because my assumption is that you can't really do anything with a partial
>> sysex message anyway,
>>
> Check out CZ-101 sysex if you're feeling masochistic. Its protocol is
> something like:
>
> sender: F0 xx... (no F7)
> receiver: F0 xx... F7
> sender: xx... F7
>
> To support this, you'd want to send the buffer up to CoreMIDI if you
> timeout waiting for the F7.
Fabulous. At least it should be simple to add support for that madness. (I
am already good friends with CFRunLoopTimerSetNextFireDate.) Is this unique
to CZ-101 or do folks know of other cases?
>> and packing each byte into a Mach message that gets shipped across at least
>> two process barriers didn't seem like a good idea for throughput.
> CoreMIDI hasn't worked this way since 10.2.2 or so. Now there are ring
> buffers in shared memory between the server and client; Mach messages
> are only sent on transitions between the empty and non-empty states.
Interesting. Well, the driver was written in the 10.1 era, which I guess
already seems like ancient history!
> But your buffering does indeed still reduce messaging and
> process-switching overhead -- good.
Phew! At least I got one aspect of it right. :-)
--
Pete Gontier
http://www.m-audio.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden