• 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: time accuracy of AU render callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >time accuracy of AU render callback (From: Sung <email@hidden>)

  • Prev by Date: Re: vDSP: performance costs of stride size != 1
  • Next by Date: listing chunks of a WAV file
  • Previous by thread: time accuracy of AU render callback
  • Next by thread: VoIP, handling ALaw encoded audio
  • Index(es):
    • Date
    • Thread