Re: CoreMIDI SysEx & MIDIMonitor
Re: CoreMIDI SysEx & MIDIMonitor
- Subject: Re: CoreMIDI SysEx & MIDIMonitor
- From: "David A. Hoatson" <email@hidden>
- Date: Thu, 31 Aug 2006 08:15:31 -0700
- Organization: Lynx Studio Technology, Inc.
... this email bounced for some reason...
Kurt,
I laughed when I saw Echo.cpp was the only example code.
Well, come to think of it, what does it do if you run it? (As the only
running MIDI app, and then concurrently with your app?) It's about as
simple as a MIDI receiving program can get. I think there are a couple
of lines you can uncomment to make it print all the data that comes in,
not just note events.
Right - I'll give that a try tomorrow morning.
I'm really just guessing at what might be going on, so any help that
you can give is much appreciated.
At this point I'd try to pare down your program as small as you can and
see if your problem keeps happening. Remove the sending side, that
seems to work fine, just worry about receiving. Do as little as you can
in your ReadProc, just stick some printf's in to see what data you're
getting.
My ReadProc is already doing nothing but just a couple of printf's and the
single call to add the data to my queue.
You're calling a method on a CByteQueue (which I assume is your own
class) -- can that potentially block for a while?
It cannot block. It is just doing a private memcpy, nothing more. I can
easily take that out just to see what happens.
You do know that the ReadProc is happening in a separate thread, and you
can't receive any more data until your ReadProc returns, right?
Right.
It almost sounds like you're blocking CoreMIDI from sending you more
data, under certain circumstances. But what that would have to do with
having other MIDI apps running is entirely beyond me.
In the case of the 1394 device with the Apple driver, my ReadProc *never*
gets called.
In any case, if you can distill this down enough, maybe you can send it
around for others to look at.
My thought exactly. Smallest possible amount of code that reproduces the
problem (or helps me figure out what works!).
Rest assured that this is definitely a weird case, not something that
typically happens... the only reason we get away with having so little
sample code is that the API is straightforward and usually just works!
Others have written me offline that they could never figure out SysEx on
OSX either, which is the only reason I made the comment about lack of
documentation. I have to document my stuff so our OEMs can use it, so I
figured I'm free to fire away :-).
I should have mentioned that I also tried this on my "clean" iMac Intel
CoreDuo test machine and got the same results.
I'll hopefully have more on this tomorrow.
Thank you,
David A. Hoatson
_______________________________________________
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