Re: AudioDeviceGetCurrentTime after headphone plug/unplug
Re: AudioDeviceGetCurrentTime after headphone plug/unplug
- Subject: Re: AudioDeviceGetCurrentTime after headphone plug/unplug
- From: Bjorn Roche <email@hidden>
- Date: Thu, 18 Jan 2007 16:10:11 -0500
On Jan 18, 2007, at 2:58 PM, Jeff Moore wrote:
The API is in the form of the time stamps that AUHAL passes out in
it's various callbacks, which is where it applies the math in
AUTimestampGenerator. To my knowledge, AUHAL does not have a
wrapper for AudioDeviceGetCurrentTime().
It seems a shame that AUHAL offers no reliable way to discover the
time of the device from another thread. I know I could save the
values from the callback, but that is not as accurate as knowing the
actual elapsed time as reported by the soundcard (if in fact that's
what AudioDeviceGetCurrentTime() does). For example, if the soundcard
is processing blocks of size 4096 frames, the current time
measurement could be off by as much as almost 1/10th of a second. It
seems a shame to loose this accuracy as there are applications where
high latency is okay (or even desired) but where timing information
is critical (eg. animation). I think I could provide some
interpolation to workaround this for PortAudio, but it this seems
like a limitation in CoreAudio to me, so I'll file an RFE.
thanks for the help,
bjorn
-----------------------------
Bjorn Roche
XO Wave
Digital Audio Production and Post-Production Software
http://www.xowave.com
http://blog.bjornroche.com
http://myspace.com/xowave
_______________________________________________
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