Re: Audio Hardware Plugin and Drift
Re: Audio Hardware Plugin and Drift
- Subject: Re: Audio Hardware Plugin and Drift
- From: Jeff Moore <email@hidden>
- Date: Tue, 30 Aug 2005 12:48:35 -0700
On Aug 30, 2005, at 12:35 PM, Dirk Musfeldt wrote:
Hi Jeff,
QT uses AudioDeviceGetCurrentTime() (which filters down to
DeviceGetCurrentTime()) to drive the audio clock. If this isn't being
called it could mean that QT isn't using your audio device as it's
clock. That in and of itself is probably enough to cause drift.
I have also noticed the drift if I play audio with another task, e.g.
ComplexPlayThru sample.
Just playing sound isn't really a good test. You can't judge drift
when there's no synchronization going on. You have to test with apps
that are really trying to synchronize audio and video playback. In
fact, I'm not at all sure how you can eve say that there is drift
when all you are doing is playing audio.
Of course, if you are saying that the audio input is drifting against
the output, then the problem is definitely in your driver since your
driver is sole source of the timing and the delivery of the data.
Figuring that out is really going to require you to get your hands
dirty and instrument the driver because the problem likely involves
your interaction with the transport mechanism.
I understand I have to work on my timestamps but maybe it could me
if I
understand how the drift is introduced. Of course my timestamps are
jittery
but how does this give drift?
Jitter tends to have bias in it since it rarely will be random in
these situations. The bias in the jitter is going to cause drift.
I think your methodology needs some work. Trying to do this by eye
isn't going to get you anywhere. You need to get into the code and
instrument it to see why you are drifting. Plus, you really have to
use apps that are designed to synchronize audio and video playback.
Then you have some objective data to work with and to guide you on
where to look next.
I also still think you are missing some things in your driver, in
terms of basic functionality, since it appears that
AudioDeviceGetCurrentTime() isn't getting called when QT is playing
to your device. This likely points to some major problems in your
driver.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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