AAX plugins switching between factory presets fails


I am working on an AAX plugin, which fails to update an audio when switching between the factory presets.

  void getStateInformation (juce::MemoryBlock& destData) override and 
   void setStateInformation (const void* data, int sizeInBytes) override

are exactly like JUCE: Tutorial: Saving and loading your plug-in state tutorial.

What are the possible places to check other than these functions?
Any suggestion/help is appreciated!


Do you have Pro Tools developer version? You could try debugging those two functions.

You could also try peppering your code with DBG statements…

How exactly is it failing? Is it loading the default, crashing, hanging, etc?

Also keep in mind that when Pro Tools loads your plug-in, it will send to it BOTH the values of automated parameters and the “blob” of StateInformation data.
I don’t remember in which order, but if the two don’t represent the same plug-in state, it’s possible that the one that comes last determines the state of the plug-in and that’s different from the state you would expect.

If you add DBG statements to have debug printouts in your code, IIRC you can see their output even using the non-developer version of Pro Tools if you start Pro Tools from the Terminal and watch the same Terminal window for their output.


Thank you for these suggestions! @AdamVenn @yfede

@AdamVenn when switching between the presets, plugin loads all values correctly but audio is still stuck at the previous preset.

So after loading the preset, the audio doesn’t seem to be affected by the parameters? I guess that would be in processBlock, but you’d have to get debugging to figure it out. As @yfede said, you can still use DBG statements without the developer version of Pro Tools, you could also probably reproduce with a VST version in a more debugger-friendly DAW/Plugin Host.

That’s not an AAX specific issue… it’s a general issue in your code which you should see in every format.

You need to make sure the parameters or coefficients or whatever you’re using in processBlock get updated in real time.


@railjonrogut I tend to agree but testing all other formats VST, AU on both the platforms PC and Mac, it was only observed in AAX plugins on both PC and Mac.

AAX can call setStateInformation in a separate thread (non UI) FWIW