Re: Stuck MIDI notes
Re: Stuck MIDI notes
- Subject: Re: Stuck MIDI notes
- From: Kurt Revis <email@hidden>
- Date: Wed, 30 Oct 2002 11:15:13 -0800
On Wednesday, October 30, 2002, at 10:01 AM, Robert Grant wrote:
I'm occasionally getting stuck notes with Rax and it's making me
wonder whether
I'm handling the incoming MIDI data properly. I'm basically following
the Echo.cpp
example and walking through the packets submitting them to the Music
Device.
I'm now wondering whether I'm taking too long in the handler and thus
the buffer
I was passed is getting diddled before I'm done and perhaps
overwriting my
note off messages.
I don't think there's any way that buffer could be overwritten while
you are using it. As I understand it: In your app, the code which
receives MIDI data from the MIDIServer runs entirely in the same thread
as your MIDI read proc. While your read proc is running, there's no way
to receive more data from the MIDIServer--it should be queued up and
handled when your read proc returns.
I suppose if you take a long time in your read proc and a lot of data
is coming in, this queue could overflow, but I've never encountered a
problem like that. For all I know CoreMIDI takes steps to stop this
from happening.
Anyway, it's easy to test your hypothesis: as the first thing in your
read proc, make a copy of the packet list, and then do your work using
the copy, not the original.
--
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.