Can a host add or remove buses while plugin is processing audio

Hi

The title says it all. Can a host add or remove buses while plugin is processing audio? From the docs, under AudioProcessor::prepareToPlay() it says:

You can call getTotalNumInputChannels and getTotalNumOutputChannels or query the busLayout member variable to find out the number of channels your processBlock callback must process.

This would indicate that I only have to check number of buses in prepareToPlay, and that this number therefore will not change while processBlock is running. However, maybe the authors didn’t take into account a plugin which supports dynamically adding and removing buses. I don’t have expensive setup that changes with number of buses, but I would still have to take care to avoid data races if this can change during processing.

I don’t know this for certain, but I would assume that this would be the responsibility of the host. You shouldn’t have to manage this, and if you find a host where you do, I’d be logging that as a bug with them.