Let’s suppose you have a plugin with any kind of metering or realtime visualization. And you are in a DAW project with several plugins coming after you that add up to a noticeable amount of latency. The meter will go out of sync, and you’ll see sound events before you hear them. So the visuals need to be delayed by the amount of latency between your plugin’s output and the final audio output.
Turns out that both AU and VST3 have a way for the host to inform about this “presentation latency”. In AudioUnit, there’s kAudioUnitProperty_PresentationLatency, and in VST there’s IAudioPresentationLatency. I haven’t found a similar property in AAX yet, but maybe there is something somewhere as well, maybe under another name.
These properties aren’t implemented in JUCE though. So I’m trying to figure out a way to get hold of this information, ideally without patching JUCE, rather by adding a custom module with implementations for the different plugin formats.
I’m a bit lost right now as to what the best approach would be for pulling this off. But maybe the hive mind has a good idea?
On the AudioUnit side I’d need to get hold of the AudioUnit instance so I can query AudioUnitGetProperty(). Right now I see no way of unearthing that.
On the VST3 side I think it’s even worse, as I’d probably need (as far as I can grasp how VST3 works at all) implement the interface mentioned above in the main processor class?
Or maybe this should just be a feature request.
![]()
