How to be notified when offline rendering starts

In my plug-in I need to reset some state right before offline rendering starts. So for instance in AAX when user clicks “Preview” or “Process” I’d like t execute some code.

I was assuming that


could be used for that but at least in Pro Tools that’s not the case. It’s only called once when the host initiates the plug-in and not prior to rendering.

I couldn’t find anything in the docs or on the forum, so any ideas are highly appreciated.


I think AudioProcessor::setNonRealtime should be called when switching between online/offline rendering. You could try overriding this function to be notified about the change.

Thanks reuk, but unfortunately that function doesn’t fire when Preview or Process is clicked …

that is because preview and process are functions of AudioSuite and not the streaming AAX. Juce doesn‘t support AudioSuite plugins on AAX.

It does support processing normal AAX plugins through the AudioSuite system. (Pro Tools puts suitable AAX plugins in the AudioSuite menu so that they can be processed with AudioSuite.)

But it’s quite odd if for example prepareToPlay isn’t called…?

Well, prepareToPlay is called but only once. So it might well be the case that the plug-in is plugged into the AudioSuite system and runs there, oblivious of the outside world … But on the other hand there must be a callback from the AAX framework. How else could plug-ins like TRAVELLER create the Doppler effect that clearly needs to know when processing begins.

EDIT: The AAX framework does send Preview/Process state notifications. Is there a way to listen to them in JUCE?

The AudioSuite is a separate interface, the API is in AAX_CHostAudioProcessor (it’s been a while since I dug into the API, didn’t do much ProTools lately). So you can render through the normal processBlock() calls, but the analyze ender pass is not available. You have to code that manually, or resort to the fork from Soundradix:

I am not aware that there was something added to official juce, but I might be wrong on that.

Ok, maybe there’s a way: when I set a breakpoint in

// juce_AAX_Wrapper.cpp


I’m able to catch the AudioSuite notifications for “Preview” and “Process” button clicks. I’m a noob here so I need to find out now how to channel that back into my own classes …