• 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: Latency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Latency


  • Subject: Re: Latency
  • From: Brian Willoughby <email@hidden>
  • Date: Tue, 28 Dec 2010 21:18:08 -0800

By the way, PresentationLatency is something calculated by an AudioUnit host and reported to the plugin so that the plugin can get an idea of any latency between its output and the actual audio output. It is intended to allow AU UI, such as metering, to be able to sync graphics with the audio for the user's benefit. You are technically writing a host, so you have to provide this value based upon your setup - you cannot request it because there is no code setting it. I don't think it is appropriate for iOS anyway, since you can't easily write your own audio units.

The other sources of latency are the plugins and the audio hardware itself. Each has a different mechanism for requesting the value. AudioUnit latency should be calculated after you initialize your graph. Before that, you'll probably get 0. Audio hardware latency is a different API, and you might have to use a different approach with the RemoteIO AudioUnit. It appears that you've discovered the API for that scenario.

By the way, the above is just a rough summary from memory - I may have a few details wrong. I just wanted to give an idea of the various kinds of latency and how their API differ.

Brian Willoughby
Sound Consulting


On Dec 28, 2010, at 18:37, Gregory Wieber wrote:
or kAudioSessionProperty_CurrentHardwareOutputLatency (depending on whether its input or output)

On Tue, Dec 28, 2010 at 6:37 PM, Gregory Wieber <email@hidden> wrote:
Wow, sorry -- complete cut-and-paste mistake!

kAudioSessionProperty_CurrentHardwareInputLatency
+ kAudioSessionProperty_PreferredHardwareIOBufferDuration is what I meant.


On Tue, Dec 28, 2010 at 5:17 PM, Paul Davis <email@hidden> wrote:
On Tue, Dec 28, 2010 at 8:12 PM, Gregory Wieber <email@hidden> wrote:
> For the sake of anyone else who may be wondering how to do this, I believe
> I've found the correct way to determine latency on iOS -- it's the sum
> of kAudioSessionProperty_PreferredHardwareSampleRate
> + kAudioSessionProperty_PreferredHardwareIOBufferDuration.


i refuse to believe that the use of samplerate (a number in the range
of 30,000-100,000) is correct in this context. i suspect you've just
latency on the order of 1 second, somehow. i could be wrong.
_______________________________________________
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: 
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Brian Willoughby <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Paul Davis <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Paul Davis <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)
 >Re: Latency (From: Gregory Wieber <email@hidden>)

  • Prev by Date: Support live resize of AU window for all hosts?
  • Next by Date: MIDI events / note jitter / remoteIO buffer
  • Previous by thread: Re: Latency
  • Next by thread: Support live resize of AU window for all hosts?
  • Index(es):
    • Date
    • Thread