Re: AU Latency & Logic Live Mode
Re: AU Latency & Logic Live Mode
- Subject: Re: AU Latency & Logic Live Mode
- From: William Stewart <email@hidden>
- Date: Mon, 24 Mar 2008 13:03:52 -0700
On Mar 22, 2008, at 4:15 AM, Martin Saleteg wrote:
List,
I am having a hard time with "Live Mode" tracks in Logic. Logic
calls my plugin with the number of samples specified either by HW
Buffer Size or Process Buffer Range. Since my plugin buffers
internally, processing latency will depend on the process buffer size.
I think this is the problem - you need to be able to set a good
process buffer size and make this independent from the I/O sizes that
your AU is going to be called for. This could even be a property in
your UI If it makes a substantial difference to your users (CPU cost,
algorithmic quality, etc).
I am currently firing a PropertyChanged() to notify Logic about
changed kAudioUnitProperty_Latency, and GetLatency() gets called as
a result of that. This works fine, with one exception:
except that it is unlikely that Logic is actually changing anything at
that point. Dynamically changing the latency of an audio unit while it
is being rendered will generally cause glitches.
We generally recommend that the AU have a fixed latency.
When selecting or record enabling tracks in Logic, they go into
"Live Mode". This causes the process buffer size to be equal to the
specified audio device buffer size.
Yes, but you can only know this by watching your program work in Logic
- your AU cannot "work this out" - there is no propogation of the I/O
pull size to your audio unit.
The only way I know about this is when the Render() call comes with
a certain buffer size. Then I can adjust latency and report it back
to Logic.
which ignores it I think.
Thus - whenever a track is set to Live Mode, it will have the "old"
latency compensation value, causing it to be out of sync until the
next Play/Stop cycle (when Logic has adopted the new GetLatency()
value).
Yes.
Is there any way I can know when a track is being set to Live Mode,
or any other method I can implement to know about buffer size before
actually hitting play?
No - as you've described your AU can be switched at arbitrary places
while rendering, so it can't adjust latency dynamically (neither can
the host).
Bill
_______________________________________________
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