• 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
Is there an accepted input/output latency compensation technique?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there an accepted input/output latency compensation technique?


  • Subject: Is there an accepted input/output latency compensation technique?
  • From: Michael Tyson <email@hidden>
  • Date: Sat, 28 Apr 2012 19:31:53 +0200

Hi folks,

I'm wondering if anyone knows the ground truth about latency compensation on iOS?

There's kAudioSessionProperty_CurrentHardwareOutputLatency and kAudioSessionProperty_CurrentHardwareInputLatency, and kAudioSessionProperty_CurrentHardwareIOBufferDuration and audio timestamps, of course, and that's all lovely, but the documentation doesn't really seem to have anything to say about what it all *means*. 

I've always just taken the audio timestamps given in the Remote IO callbacks, and added/subtracted the kAudioSessionProperty_CurrentHardwareOutputLatency/kAudioSessionProperty_CurrentHardwareInputLatency values as required, and that seems to do the trick when saving synchronised recorded audio - latency seems to be pretty much zero (recording a loop playing out the speaker of the same device yields a recording that plays back perfectly in time) - but I'd love to know if there's a Right Way somewhere.

I'd also like to know why, if the system knows the device input and output latencies, the system doesn't automatically add/subtract these to/from the audio timestamps handed to us in the callbacks. Surely those timestamps should aim to reflect the time the audio wavefront hit the mic, or the time the speaker starts vibrating in response to the audio in the buffer?

Anyone know anything about this?

Cheers!
Michael


-- 
Michael Tyson | atastypixel.com

Live, app-to-app audio streaming is coming soon.
Don't want to miss our launch? Then sign up here: http://audiob.us



 _______________________________________________
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: Is there an accepted input/output latency compensation technique?
      • From: Michael Tyson <email@hidden>
  • Prev by Date: Re: Dropped Buffers from mouse-menu tracking
  • Next by Date: Re: Is there an accepted input/output latency compensation technique?
  • Previous by thread: Apple Loops
  • Next by thread: Re: Is there an accepted input/output latency compensation technique?
  • Index(es):
    • Date
    • Thread