How to call SetLatency method correctly?

I try to change the latency while the plugin is running by calling the SetLatency method with the specified number of samples, however the changes only take effect when the plugin is reloaded into the DAW. Something else needs to be done besides calling the SetLatency to make the change come straight away?

depends on the DAW afaik.

The problem only occurs in VST2. Solved the problem by causing the SetLatency() with the maximum value of latency, and to support other values it was necessary to set the additional buffer, which delays the signal by the difference of maximum and required values.

1 Like