Re: Calculating latencies
Re: Calculating latencies
- Subject: Re: Calculating latencies
- From: Rick Peacock <email@hidden>
- Date: Wed, 7 Nov 2007 16:29:31 +0000 (GMT)
Hi,
An update on my issue of calculated v measured latency
for a M-Audio Firewire410. After the tipoff I used
AUPulseDetector in AULab, which does a very slick job
of measuring latency through the wire. Thanks! It
reports the same latency figures as my test app -
AULab reports the Firewire410 latency as 1362 samples
under the driver properties in preferences and
AUPulseDetector reports an actual 1251 samples so it
looks like my original test app isn't guilty of
introducing any error. Incidentally, altering the
buffer size made no difference to the difference
between actual and calculated.
At least it gives me an idea what error margin I will
have to deal with and possibly incorporating a user
calibrate mode that performs the same test as the
AUPulseDetector for my final app.
Thanks,
Rick.
>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.
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
_______________________________________________
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