Re: Getting notifications for AudioUnit ProcessBufferLists
Re: Getting notifications for AudioUnit ProcessBufferLists
- Subject: Re: Getting notifications for AudioUnit ProcessBufferLists
- From: Stéphane Letz <email@hidden>
- Date: Fri, 11 Feb 2005 14:51:59 +0100
Le 9 févr. 05, à 19:38, William Stewart a écrit :
On 09/02/2005, at 1:12 AM, Stéphane Letz wrote:
>However, the missing reset should not be a problem because the engine
>keeps on processing the AU until the tailtime reported by the AU is
>over (or until there's less than 60 dB of output for more than 1 second
>or so). This way, the AU will run until their buffers are (at least
>very close to) silent, and the start of the next audio region should be
>processed without leftovers.
Thanks for the explanations.
My AU was not reporting any tailtime. I tried to implement GetTailTime and SupportsTail but I still have problems. I was thinking that as soon an AU has a tailtime, then it would receive silence buffers during the tailtime duration and that would "automatically" clear the last dirty buffer I had. Is the tailtime semantic this one?
Basically the host would continue to call your AU for output, but because its run out of input, would provide silence. However, there's no indication that you are at the end of a slice (ie. that there won't be anymore work to do) - its just more input for you to process. So, the AU would then have a cached internal state at the end of this that is a result of processing that amount of silent input.
My AU redirect audio streams to other processes. I added the following functions :
virtual Float64 GetTailTime() {printf("GetTailTime\n"); return (Float64)1.f;}
virtual bool SupportsTail() {printf("SupportsTail\n"); return true;}
thinking that when Logic stops, it would deliver empty buffer during the tail duration. But it seems that the AU
ProcessBufferLists callback is "stopped" immediately, and a "dirty" buffer is still used instead of a silent one. (Logic Platinium 6.3.3)
The intention of AudioUnitReset was that it would be called before an AU was asked to process a non-contiguous block of input - which is certainly the case here and to my mind, Logic should be calling reset before it asks you to process the next block - The reason I think Reset should be called is that there will be a dis-continuity of the time stamps provided to the AU (as well as any host callback info) - so if Reset isn't called, I don't know how the AU is meant to react to this discontinuity in any sensible manner.
Pulling just tail samples of silence through, then taking the AU "offline" for some period, is a very different action than just continuing to pull silence through the AU for the time period that logic is playing over the region with no input to process.
So, I'd really like to get the problems Logic is having with AU's and their reactions to AudioUnitReset being called.
That said, there's no obligation /advise we've made about telling your AU its about to taken out of the picture for a while (just that its coming back in). But this has been discussed previously I think.
Or is there any other way to detect in the ProcessBufferLists method that the AU is in the tail part to call the cleaning code?
Nope... If you want to see how this "should work", have a look at auprocess in the AudioFileTools SDK - its CAAUProcessor class takes into account both latency and tail of an effect. You'll see in that transition though, that there's no indication to the AU...
Bill
Any idea of what is wrong?
Thanks
Stephane Letz
_______________________________________________
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