What should be done (from a host point of view) after the ASIO buffer size changed?


I am developping an host and I have the following problem : my host crashes after retsarting the asio driver if the buffer size was increased (no problem if the buffer size is decreased).

Here is what I do after the user changer the ASIO buffer size (pseudo code) :

if(myAsio.isRunning()) wr->myAsio.closeASIODriver()

For each Plugin
** Delete the AudioClient::Buffers*
** Allocate the AudioClient::Buffers with new buffer size*
** vst3Processor->setSamplerate(asioDriverInfo.sampleRate)*
** vst3Processor->setBlockSize(asioDriverInfo.preferredSize)*


Then, the application crashes after vst3Processor->process as if a plugin would write in a wrong memory space.

Is there something else I must to to inform a plugin that the buffer sized has changed?

Thank you for your help!

You have to be sure that the plugin gets such call sequence:
plugComponent->setProcessing (false);
plugComponent->setActive (false);
plugComponent->setupProcessing (…)
plugComponent->setActive (true);
plugComponent->setProcessing (true);
plugComponent->process (…

Did you try to use the VST3hostchecker plugin as test plugin? It checks if the plugins is correctly called…

Thank you Yvan for your quick return. I use the AudioClient class to interface with the plugins.

AudioClient::setSamplerate() and AudioClient::setBlockSize() both call AudioClient::updateProcessSetup() after respectively settting sampleRate and blockSize.

AudioClient::updateProcessSetup() contains the exact sequence that you described above.

So, I don’t see what else I should do???

Yes, I tried with VST3hostchecker. I don’t see any particular error. Is there something specific I should look at?