Another audio latency question: 43 frame offset?
Another audio latency question: 43 frame offset?
- Subject: Another audio latency question: 43 frame offset?
- From: Kurt Revis <email@hidden>
- Date: Mon, 26 Nov 2001 06:05:02 -0800
So I'm playing around with some code to test the latency and
timestamping of the audio system and hardware. I'm running a cable
directly from my computer's output back into its input. Then I play a
tick on the output, and listen for the tick in the input. This seems
simple enough.
The weird thing is that the timestamps of these two events are always 43
frames apart! From what I understand about CoreAudio's timestamping
system, I would expect the times to be the same. My understanding is
that the timestamps indicate exactly when my audio will be played, and
when it was received (right?).
(I might expect the timestamps to be off by a frame or two, to account
for random analog hardware slop. But 43 frames seems like a long time to
me--almost a millisecond.)
Can anybody explain to me where this 43 frame offset is coming from? Is
this just a property of the way the audio hardware works, or am I
misunderstanding things?
Details: I get the same results on both a G4/450 tower and a Pismo
PowerBook, both using the built-in audio hardware. Daisy shows the
"input latency" and "output latency" to be 0, and the safety offset to
be 16 frames.
My app's buffer size doesn't have any effect on the 43 frame offset.
Thanks to anyone who can provide illumination! (Yes, I'm full of
questions today...)
--
Kurt Revis
email@hidden