Re: Core Audio Clock help
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