Re: Audio playing too quickly
Re: Audio playing too quickly
- Subject: Re: Audio playing too quickly
- From: William Stewart <email@hidden>
- Date: Mon, 22 May 2006 10:45:00 -0700
On 20/05/2006, at 9:07 PM, Steve Checkoway wrote:
On May 18, 2006, at 4:21 PM, Steve Checkoway wrote:
William Stewart wrote:
It does sound to me like you may have some mismatch between the
device and client formats...
Have you considered using the output units to do this work for you:
Thank you for the suggestion, I'll look into it again.
Okay, after looking at it, it is pretty simple but I have a few
questions. I noticed that the render callback does not have a "now"
parameter like the IOProc's do when using AudioDeviceAddIOProc. Is
there a way to get this in the render callback?
No, the HAL provides more information than the AU does.
In a related question, is there a way to get the current time
outside the render callback like AudioDeviceGetCurrentTime() does?
AudioDeviceGetCurrentTime() :-)
I thought about listening to the
kAudioHardwarePropertyDefaultOutputDevice property and keeping
track of which device is currently the default output device and
just using AudioDeviceGetCurrentTime() in both cases but I'm not
sure if that will be using the same clock as inTimeStamp parameter
to the AudioUnit's render callback or if that's brittle in some
other way.
The time stamp that is provided by the output unit to its client is
the out-time time stamp provided by the HAL. That is, the output unit
is asked to generate audio for a particular time, and that time is
propagated through. It is the same for the generic output - the time
stamp provided by the client will be propagated. There is one
qualification to this. The output unit will by default, reset the
sample count of the time stamp to start at zero when it is started.
The host time is left unchanged. You can overide this by setting a
property on the output unit to not do this.
Bill
Thanks,
- Steve
--
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