Does setProcessing(false) followed by setProcessing(true) Really Reset a Plugin?

In the documentation for the setProcessing call, it says:

Note that setProcessing (false) may be called after setProcessing (true) without any process calls… this could be used to reset some buffers (like Delay line or Reverb).

I guess the operative word here is could, because this doesn’t seem to actually reset the buffers.

The sequence of events goes like this for me:

  1. Send a MIDI Note On message into a synth plugin, e.g., the mda DX10 from the VST3 SDK.
  2. I then disable audio output in my host, I call processor->setProcessing(false) followed immediately processor->setProcessing(true), and stop calling IAudioProcessor::process(ProcessData&).
  3. Eventually, the user enables audio output, and so my host resumes calling IAudioProcessor::process(ProcessData&)

When I resume calling the process function, I hear the remainder of the note, even though I did what documentation suggests is a reset procedure.

Furthermore, the documentation on bypassing, it is suggested that calling the IAudioProcessor::process() function with all members of the ProcessData struct set to 0 works to “flush” the plugin. Adding a call like this to my code also did not silence the mda DX10 plugin when audio output resumed.

I am loath to fully reinstantiate the plugin, nor to call setActive(false) and then setActive(true), because both procedures can only be done on the main thread according to the documentation.

So what’s the dealio? Is there a reliable and recognized way to get an instantiated plugin to clear out its audio buffers?

Thanks in Advance,
Mark

To reply to myself here: examining the code for the mda DX10 in particular, it is clear that the number of active voices will never go down to zero unless valid blocks of sound data are provided to its IAudioClient::process function. Do these mda plugins in the examples not represent the standard in terms of responding to setProcessing(false)/setProcessing(true)?

They don’t even override setProcessing(), instead this is handled by the AudioEffect superclass, in vstaudioeffect.cpp as follows:

tresult PLUGIN_API AudioEffect::setProcessing (TBool /*state*/)
{
	return kNotImplemented;
}

Thanks in advance for your insight.

Sincerely,
Mark

It seems that mda plugins of the SDK do not follow the VST3 spec regarding setProcessing…

Nor do they they respond to an IAudioProcessor::process() call with all members of the ProcessData struct set to 0. I have added a github issue asking for these examples to be updated to correctly reflect the best practices for plugin development.

We will add in some examples of the VST SDK the use of setProcessing