Re: kAudioUnitProperty_PresentationLatency usage
Re: kAudioUnitProperty_PresentationLatency usage
- Subject: Re: kAudioUnitProperty_PresentationLatency usage
- From: Marc Poirier <email@hidden>
- Date: Mon, 17 Oct 2005 18:08:40 -0400
Thanks for the info, Bill, but it doesn't really answer my question.
Or at least, doesn't tell me more than I already gathered from the
header comments. I'm having trouble figuring out the specific
practical use of input and/or output values in an actual metering
situation. The short version of my question is at the end of my
initial email:
So far as my AU is concerned, the input is occurring at the same time
that its corresponding output is being generated. So then I wonder,
do I just want to offset both displays (input level and output level)
by PresentationLatency on the output scope? Or do I want to offset
both displays by the sum of the PresentationLatency on both input and
output scopes? Or something else?
thanks,
Marc
On Oct 17, 2005, at 5:57 PM, William Stewart wrote:
The idea of this property is to describe the time it takes/has
taken, for audio that an AU is dealing with to be finally presented.
For example, if you were providing a metering of your output, then
you would need to adjust the display of the metering based on the
presentation latency if you want this to accurately reflect what
the user is actually hearing - in other words, it takes
"presentation latency" time for your output samples to be
presented. For input of course, its the reverse - how long it took
from the "nominal time" of the sample hitting the input circuitry
until your AU saw it. If you don't take this into account for the
metering, then your meters will be metering audio the user has yet
to hear.
So, these figures are really there to provide you a context - its
not your latency that is the issue, but rather the latencies before
(input) or after (output) from your AU that this property reports.
There is no way for you to know this, so its information optionally
that is provided to you by the host - its a write only property too
of course.
Mostly, I think, this doesn't really matter, but as you get into
rendering threads that are rendering say a 1/2 second ahead, or you
get into AUs that do their processing with significant latencies
(say hardware accelerated), then this can start to have a
noticeable affect.
Bill
On 17/10/2005, at 1:31 PM, Marc Poirier wrote:
I'm a little unsure of how to use the
kAudioUnitProperty_PresentationLatency property. In my scenario,
I have an AU that provides a visual meters for the input level and
the output level. What I've been doing is to adjust the display
of the input level by the value for PresentationLatency on the
input scope, and adjust the display of the output level by the
value for PresentationLatency on the output scope. But then I
started doubting that this makes sense. My AU itself has no
latency in its DSP, so why would I ever want a different
PresentationLatency latency value for input vs. output? In cases
where my AU might be getting different values, then what that
would do would be to make the level meters out of sync with each
other. So far as my AU is concerned, the input is occurring at
the same time that its corresponding output is being generated.
So then I wonder, do I just want to offset both displays by
PresentationLatency on the output scope? Or do I want to offset
both displays by the sum of the PresentationLatency on both input
and output scopes? Or something else? I am very unsure...
thanks,
Marc
_______________________________________________
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