AAX changing parameter between prepareToPlay and 1st processBlock

I realize this is a primarily an AAX issue, but I thought someone might have come across this.

I’ve jumped through most of the hoops needed for Pro Tools to work with my AAX and there’s this one odd little issue with a parameter being changed after prepareToPlay and before the first call to processBlock.

I have all my factory default presets saved in the bundle as TFX files like Pro Tools likes, and inside my processor’s constructor, my plugin loads the first preset before any setStateInformation calls. This works fine in all other formats. But in AAX, one of my parameters gets changed before the first processBlock call. How and why? Is there some little Pro Tools thing going on here?

For what it’s worth, that parameter is being changed by UpdateParameterNormalizedValue() in the juce_AAX_Wrapper.

Yes, AAX is different. It does not work when you load the default preset in your constructor. You have to overwrite getDefaultValue() or set the right default value when you are using the new parameter classes.

Yeah, Pro Tools just has to be difficult. For all the other formats, I had getDefaultValue() returning a reasonable default value for whatever parameter it was, like 0.0, or 0.5 or whatever. But if I did that for AAX, it looks like it’s loaded a preset that’s empty, so for AAX I have getDefaultValue() return the values in the first preset. Feels like a horrible hack.