AudioProcessor suspendProcessing (small) request to prevent heavy clicks


The suspendProcessing-method is a nice feature to perform heave tasks on processors.

The plugin-wrappers will  clear the buffer when the processor is in suspending mode, but this can cause heavy clicks, so my idea is: there should be a processBlockSuspendend()-override-able callback (which in default just clears the buffer) in AudioProcessor which is called from the wrappers.

I think this is easy to implement and won't break any existing code.


I think the current suspending-behavior is a little bit inconsistent, once you write the processor should self test in processBlock() if it is currently in suspended-mode, but the wrappers just clear the buffer und don't call processBlock() . There should be a callback in AudioProcessor which should be used for audioProcessing from outside (which checks for the suspending-mode), and a internal override-able callback.  So all "suspend"-logic should be inside the AudioProcessor-Class.


Hmm.. There's already a processBlockBypassed.. Maybe that would actually be a better thing for it to call than having it clear the buffer.

Thanks for pointing out the comment - that is a bit misleading, I'll correct it.


>>> Maybe that would actually be a better thing for it to call than having it clear the buffer.

Yes but this is not ideal too.

An ideal solution would be, there are two options how the plugin is set to suspended-mode

#1: Set the plugin immediately to suspended-mode, like yet 

#2: Fade-out audio, set suspended mode on and vice versa set suspended-mode off and fade-in

This could be realized with a timer,  the whole suspended-logic should be inside the Audio-Processor class, the whole suspended-logic could be removed from the wrappers

processBlock() should not be accessible from outside, there should be an extra-callback which handles the suspended-mode logic.