Re: AudioServer plugin: how to calculate latency?
Re: AudioServer plugin: how to calculate latency?
- Subject: Re: AudioServer plugin: how to calculate latency?
- From: Dan Klingler <email@hidden>
- Date: Fri, 24 Apr 2015 11:15:26 -0700
> 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@hidden> 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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
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