• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
setting up independent timing thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: setting up independent timing thread
      • From: Kurt Revis <email@hidden>
  • Prev by Date: MIDI device picture
  • Next by Date: are outOutputData mData float buffers always zeroed?
  • Previous by thread: Re: MIDI device picture
  • Next by thread: Re: setting up independent timing thread
  • Index(es):
    • Date
    • Thread