Is there a simple way to indicate to a plugin that it should bypass (but still respect the reported latency)?
As a plugin this is indicated to you via the
processBlockBypassed() call which can be overridden. Unfortunately, unless I’m sadly mistaken, it appears as a host there is no cross-format way to tell a plugin to bypass. Calling
processBlockBypassed() just passes the audio straight through will no delay, and on top of that a good plugin should ideally interpolate a bypass parameter anyway. Some formats make you report a bypass parameter but if there is a bypass parameter this is not indicated in any way that I can see to a JUCE host.
I could as a host do the work myself by checking the latency reported and implementing a delay. However…
Some plugins have a visible bypass button that is synchronized with the bypass state reported to it by the host (except VST2 where this isn’t entirely possible because the plugin can’t then tell the host to change the bypass state).
I’m writing a command line host application and I want to test that the reported latency is being correctly implemented by bypassing the plugin, passing an impulse signal and checking the correct amount of delay was applied.
I would be happy to make some suggestions to the code base however I’m not sure how best to approach it. IMO I’ve always thought the processBlock and processBlockBypassed was a slightly odd decision, a simple setBypassed() in the AudioProcessor would have sufficed, and certainly would have made more sense in this particular case.
I guess what would be needed is a set/get bypass and the possibility to receive a callback when the state changes?