• 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
Re: Core Audio Clock help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Audio Clock help


  • Subject: Re: Core Audio Clock help
  • From: philippe wicker <email@hidden>
  • Date: Thu, 24 Sep 2009 08:31:16 +0200

Assuming that you need some code to run precisely every 1.3 milliseconds whatever the load of your computer the only solution than I can think of is to rely on a real time thread looping on a pthread_cond_timedwait or a CAGuard::WaitUntil(). Aternatively you could use one of the different flavors of output AU and sets the buffer size to say 62 at a 48KHz sample rate (the audio callback would be called every 1.29 ms, but maybe it's too much resource compared to the 1st solution). In addition you'll have to be careful about the code you run within the thread loop body (or the audio callback). It must have a short execution time (<< 1.3ms), don't use potentially blocking API (eg hidden malloc)....

Could you tell us more about what you want to run every 1.3 milliseconds?

On 21 sept. 09, at 10:16, Harry G wrote:

Hi, I'm in need of a very accurate timing mechanism, NSTimer seems to be inadequate so I'm looking into using Core Audio Clock, but it's mighty confusing.

All I wish for is to have a Objective C method fire (precisely) every 1.3 milliseconds, could someone possibly be so kind as to show me the way to go about this using CoreAudioClock.h please?


Thanks _______________________________________________ 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

_______________________________________________ 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
References: 
 >(no subject) (From: James Robertson <email@hidden>)
 >Re: (no subject) (From: Jean-Daniel Dupas <email@hidden>)
 >Core Audio Clock help (From: Harry G <email@hidden>)

  • Prev by Date: Splitter Unit
  • Next by Date: Re: Audio File Services won't open some SDII files
  • Previous by thread: Re: Core Audio Clock help
  • Next by thread: Trying to use an AUConverter with an input callback (Leopard 10.5.8)
  • Index(es):
    • Date
    • Thread