How to Specify Plugin Latency?

Am quite new to Juce so this may have been answered before but couldn’t find it by searching on in the examples.

My plugin needs to look ahead a bit, so how do I specify the extra latency my plugin will have to generate?

As the amount of lookahead will vary depending on user needs (parameter settings), how do I specify when latency changes?


You can set the latency via AudioProcessor::setLatencySample.