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:
- Send a MIDI Note On message into a synth plugin, e.g., the mda DX10 from the VST3 SDK.
- I then disable audio output in my host, I call
processor->setProcessing(false)
followed immediatelyprocessor->setProcessing(true)
, and stop callingIAudioProcessor::process(ProcessData&)
. - 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