• 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
IPhone's AudioTimeStamp is not mach_absolute_time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IPhone's AudioTimeStamp is not mach_absolute_time


  • Subject: IPhone's AudioTimeStamp is not mach_absolute_time
  • From: "Konrad Gianno" <email@hidden>
  • Date: Thu, 30 Oct 2008 22:13:00 +0000

I am writing an iPhone application that continuously runs a recording audio queue. I need to be able to extract rather precise timing information out of the audio queue buffers passed from the system, and I need to relate that timing information with the current system time. From different posts on the web, I understood that the mHostTime field of AudioTimeStamp - provided together with the audio buffers - is the system bus clock, accessed via routines in mach/mach_time.h. However, it seems that this is not always the case. Experiments show that during some runs everything works as expected: The mHostTime field of AudioTimeStamp clicks as fast as the value returned by mach_absolute_time, and the values have consistent magnitudes. Later however, during a different run on the same device, the host-time of the AudioTimeStamp runs at the double clock rate compared to the time returned by the mach_absolute_time routine.

I can easily detect situations in which the two clocks run at different speed, and I could create a conversion routine between the two times by establishing an anchor point, since I know the relation of the clock speeds. The problem is that establishing an anchor point is not easy, since I receive the audio buffer timing information asynchronously.

Being able to directly access the clock used by the system to fill-in the AudioTimeStamp would solve my issues. What is the time used in AudioTimeStamp and how can I access it?

 _______________________________________________
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

  • Follow-Ups:
    • Re: IPhone's AudioTimeStamp is not mach_absolute_time
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: IOProc never called after AudioDeviceStart
  • Next by Date: Re: Biquad bandpass filter for iPhone
  • Previous by thread: Re: Biquad bandpass filter for iPhone
  • Next by thread: Re: IPhone's AudioTimeStamp is not mach_absolute_time
  • Index(es):
    • Date
    • Thread