> How can I estimate the latency?

Do you want to estimate the end-to-end latency from the application to the 
speaker, or just figure out what set your AudioServerPlugin’s 
kAudioDevicePropertyLatency to?

For output, kAudioDevicePropertyLatency should be the time between when audio 
is “consumed” by the AudioServerPlugin and when it hits the speaker.

When an application receives an audio callback with a particular 
AudioTimeStamp, the HostTime (in the future) in that AudioTimeStamp says when 
the beginning of that block of audio will be consumed by the device (which is 
based on the ZeroTimeStamps provided by the device). The audio system’s choice 
of this HostTime has already accounted for things like IOBufferSize, device 
safety offset, etc. The device's kAudioDevicePropertyLatency should describe 
the additional delay from the consumption of the samples to hearing it at the 
speaker.

Dan


> On Apr 24, 2015, at 3:17 AM, Eric Gorouben <[email protected]> wrote:
> 
> Hi,
> 
> I'm a bit confused with kAudioDevicePropertyLatency. 
> The latency depends (among others) on the buffer frame size. However, an 
> audio server plugin constantly adjusts the buffer size in a best effort to 
> satisfy all clients. The "inIOBufferFrameSize" is pretty unpredictable.
> How can I estimate the latency?
> 
> Thanks
> Eric Gorouben
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/coreaudio-api/dklingler%40apple.com
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to