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: Jeff Moore <email@hidden>
- Date: Tue, 27 Sep 2005 12:16:13 -0700
AudioDeviceGetCurrentTime() is the function in the HAL to get the
current time from the device. This timeline starts at 0 when the
hardware starts and monotonically increases while the hardware is
running. This timeline is shared amongst all processes.
Each instance of AUHAL has a timeline that is coincident with the
HAL's timeline. AUHAL also resets it's sample counter to 0 every time
it is started. The difference is that starting/stopping an instance
of of AUHAL is not necessarily going to result in starting/stopping
the hardware since the hardware is shared.
I believe that you can use the property,
kAudioOutputUnitProperty_StartTimestampsAtZero, to tell the instance
of AUHAL to not reset the sample time.
On Sep 26, 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.
I tried using AudioDeviceGetCurrentTime, but every so often, the
timestamp passed to my input callback resets to 0 and starts counting
from there even though the time AudioDeviceGetCurrentTime returns does
not get reset. Is there something I'm doing wrong that is causing this
reset? Or is AudioDeviceGetCurrentTime the wrong way to get the
current sample time?
--
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