AudioProcessor::suspendProcessing confusion.


#1

I'm fairly new to JUCE so please bear with me.

I need to suspend processing of a plugin loaded into an AudioProcessorGraph to conserve CPU time. The obvious choice is the ::suspendProcessing(bool) function in AudioProcessor class.

Calling this on anything but the main AudioProcessorGraph does not do anything. The loaded plugins still plays happily as if nothing had happened.

I also tried to remove all connections from/to loaded plugin, but this has the same result. The plugin that's loaded still runs and uses CPU time.

So the only two ways to actually stop processing are 

1) Call suspendProcessing on the graph that is registered with the DeviceManager

2) Remove the callback from the device manager altogether.

Am I missing something obvious here?

All I want is to bypass all processing for a loaded AU or VST plugin (I am playing with AUs for now only, but I assume its the same for VSTs).

Any help would be appreciated.


#2

if i remember correctly the suspendProcessing info is used by the caller of the AudioProcessor. The Plugin-wrappers have a logic inside to prevent calls to processBlock while suspending, i think this is missing in the AudioProcessorGraph.


#3

I am not sure I understand your comments:

"if i remember correctly the suspendProcessing info is used by the caller of the AudioProcessor"

What do you mean by "used by the caller of the AudioProcessor"? This is a method of AudioProcessor class. As I mentioned in my initial post ... if I call suspendProcessing() on the main AudioProcessorGraph (a subclass of AudioProcessor)  connected directly to the DeviceManager's callback - the processing stops. 

The question is why doesn't it stop when I do the same for individual AudioProcessors (loaded plugins) and is ther ea way to stop the processing?