Calculating latencies
Calculating latencies
- Subject: Calculating latencies
- From: <email@hidden>
- Date: Thu, 1 Nov 2007 22:03:32 -0000
- Thread-topic: Calculating latencies
Title: Calculating latencies
Hi,
I'm investigating how to programmatically calculate the full latency from output wired back to input. To test I've setup a bi-directional AUHAL with the callback generating a test tone and recording input to show in a basic waveform display so the sample position of where the test tone starts can be seen visually.
From the documentation and posts from this list the latency for each path is (device latency + callback buffer frame size + device safety offset + stream latency). I gather that the devices kAudioDevicePropertyIOCycleUsage parameter can reduce the latency but this for all tests was left at 1.0
My first tests looked promising - for my built in input and output this formula gave 1656 samples, and a series of physical tests resulted in latencies between 1651 and 1659 - accurate to +/-5 samples!
Then I tested with a M-Audio Firewire 410 which gave a calculated latency of 1362 (584 for input + 778 for output) but repeated tests showed latencies from 1251 to 1259, again a variation of 10 samples but 100 samples off the money.
What I would appreciate knowing is should I be worried about this? I'm not sure if there is flaws in my method (very possible!) or if it's a case of not all device drivers can get it as good as Apple.
Thanks,
Rick.
**********************************************************************
The information in this e-mail is confidential and intended solely
for the use of the individual to whom it was addressed. If you are
not the intended recipient, be advised that you have received this
e-mail in error and that any use, dissemination, forwarding, printing
or copying of this e-mail is strictly prohibited. If you have received
this e-mail in error, please advise the sender by using the reply
facility in your e-mail software, and then delete it from your system.
**********************************************************************
_______________________________________________
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