setting up independent timing thread
setting up independent timing thread
- Subject: setting up independent timing thread
- From: Jim Coker <email@hidden>
- Date: Fri, 12 Jul 2002 13:12:11 -0500
I'm writing a MIDI sequencing application using Cocoa/Objective-C for
the UI and C for MIDI handling.
In order to setup an internal clock, as well as service free-running
MIDI LFOs, I need
to setup a thread that wakes up approx every millisecond to do
clock-related calculations,
deal with incoming events grabbed by my MIDI ReadProc, and pre-schedule
outgoing
MIDI events.
I have two obvious choices for thread API's -- either Cocoa NSThreads or
pthreads
(my preference is for pthreads, to keep all MIDI-specific code in C),
but what
isn't obvious is how to most effectively setup timed activation of the
thread and what priority
it should have. CFRunLoopTimer looks promising, but I'm having a hard
time finding
sufficient doc on it. Actually, the header file isn't so bad, but what
I really need to know is
what the recommended practice would be in this situation.
Suggestions?
Thanks,
Jim
_______________________________________________
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.