Re: time accuracy of AU render callback
Re: time accuracy of AU render callback
- Subject: Re: time accuracy of AU render callback
- From: Brian Willoughby <email@hidden>
- Date: Fri, 17 Feb 2012 18:04:10 -0800
On Feb 15, 2012, at 01:29, Sung wrote:
I am thinking about using Audio Unit render callback for very
accurate time measurement.
For example, say I configure AU with sampling rate = 20,000, then
the time elapsed from sample number 1 to sample 1001 will be
1000/20,000 seconds.
How accurate and reliable this measurement will be? Within 5-10ms,
or worse?
It depends upon the buffer size. Also, if the selected audio
hardware does not support 20 kHz then your callback rate will be
based upon the actual hardware sample rate and not your local
callback sample rate.
But this all seems unnecessarily convoluted. If you need CoreAudio
time accuracy, then why not just call the timing API directly?
Look for API like AudioGetCurrentHostTime() and
AudioGetHostClockMinimumTimeDelta(). The latter will tell you
exactly how precise your measurements can be.
Brian Willoughby
Sound Consulting
_______________________________________________
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