We’re exploring upgrading to JUCE 7. Now when we start our plug-ins we get loads of asserts in AudioProcessor::validateParameter()
. OK great, my awareness of the issue has been risen! The problem is though that some of our plugins have loads of parameters with their definitions scattered over different modules. adding a version hint to each of them seems to be a mind-numbing and time-wasting endeavour.
As I understand it, the parameter indices! are sorted by (version, paramIdHash)
, so having a version hint of 0 (which is the current default) yields the previous ordering. Then adding a parameter with (1, someNewParamId)
would add the new parameter to the back of the array.
So isn’t the assert a bit pointless (other than raising awareness of course) ? Can we get an option to disable this or at least fire only once ?
Thanks and all the best,
Ben
addendum: Why is there the wrapperType == wrapperType_Undefined
expression? When would this be the case?
addendum 2: I propose to change the assert into the following:
/* If you're building this plugin as an AudioUnit, and you intend to use the plugin in
Logic Pro or GarageBand, it's a good idea to set version hints on all of your parameters
so that you can add parameters safely in future versions of the plugin.
See the documentation for AudioProcessorParameter(int) for more information.
*/
#if JucePlugin_Build_AU
static auto warningShown = false;
if (!warningShown && !(wrapperType == wrapperType_Undefined || param->getVersionHint() != 0))
{
DBG("WARNING: one or more of your parameters IDs do not have a version hint. Set a breakpoint in ");
DBG(" " << __FILE__ << ":" << __LINE__);
DBG("to learn more.");
warningShown = true;
}
#endif
Or am I missing something ? Do I really MUST add version hints to all the parameters if I ever want to add parameters to the AU versions in the future ?