AU latency change


#1

this was asked before for RTAS. Is there a way to notify the AU host that the latency is changed? The AU doc says that this should be possible :

[i]kAudioUnitProperty_Latency

If the sample latency for your audio unit varies, use this property to report the maximum latency. Alternatively, you can update the kAudioUnitProperty_Latency property value when latency changes, and issue a property change notification using the Audio Unit Event API.


[/i]

Is this possible in Juce?


#2

I haven’t added latency change notification to the API, but I’m sure it could be done. Too busy working on other areas to task-switch over to plugin coding at the moment, though…


#3

I’ve looked into the subject before, but it does not seem an easy task, look here:


#4

Yeah, not too surprising to hear that hosts might ignore or have problems with latency changes.


#5

Seems like all it requires is one line in JuceAU::audioProcessorChanged

    void audioProcessorChanged (AudioProcessor*)
    {
        PropertyChanged (kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0);
    }

Works for me in Logic (the user needs to stop and play before the change takes effect but it does take effect)

Cheers! Yair


#6

What’s “PropertyChanged”? Is that a global function, or something in the AU classes?


#7

it’s a method of AUBase


#8

Ah! Excellent idea, thanks!