Re: Input callback timestamp reset and current sample time
Re: Input callback timestamp reset and current sample time
- Subject: Re: Input callback timestamp reset and current sample time
- From: William Stewart <email@hidden>
- Date: Tue, 27 Sep 2005 11:03:50 -0700
On 26/09/2005, at 9:49 PM, email@hidden wrote:
Is there a way to get the current sample time for an output audio
unit? I install an input callback for the default output unit and when
it's called, I use the timestamp passed in, but there are times I need
to get the sample time outside of my input callback.
This sample time of the device can be completely arbitrary - if
another process has started the device, then it will be some number
depending on how long the device has been running on the system.
I tried using AudioDeviceGetCurrentTime, but every so often, the
timestamp passed to my input callback resets to 0
That implies that the output unit has been stopped and restarted (or
the device has been).
and starts counting
from there even though the time AudioDeviceGetCurrentTime returns does
not get reset.
If the output unit were stopped, but the device is still running you
would see this behaviour.
Is there something I'm doing wrong that is causing this
reset? Or is AudioDeviceGetCurrentTime the wrong way to get the
current sample time?
Stopping/Starting the output unit?
No - that's the correct API.
What do you do with this sample time?
Bill
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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