Re: What's the correct way to measure latency of audio input and output?

2017-08-06 Thread Ricci Adams
Hi Dan, Thanks for this! For those of us targeting both iOS and macOS, is -[AVAudioSession outputLatency] equivalent to kAudioDevicePropertyLatency + kAudioStreamPropertyLatency? Hence, is it correct to add outputLatency to the output timestamp provided in the callback? Ricci On Jul 29, 201

Re: What's the correct way to measure latency of audio input and output?

2017-07-31 Thread Dale Curtis
Thanks both for the replies. I'm glad to hear we what we have is as correct as can be. Especially since I wrote it long enough ago that I couldn't remember why we did this :) I'll update the code to include a link to this discussion for future reference. - dale On Sun, Jul 30, 2017 at 9:32 PM, Pa

Re: What's the correct way to measure latency of audio input and output?

2017-07-30 Thread Paul Davis
One small note: the description offered by Dan regarding latency figures from a device driver are only correct if the device includes (and correctly reports on) its own DA/AD conversion. If you use external converters (e.g. the audio interface has a digital connection to your converters), then the

Re: What's the correct way to measure latency of audio input and output?

2017-07-29 Thread Dan Klingler
Hi Dale, For input: The input timestamp provided to the app in the callback represents the time at which the first input sample in the buffer was delivered to the driver by the hardware. This timestamp will be in the past of "now". The driver provides kAudioDevicePropertyLatency and kAudioStrea