So I wanted to try out the develop fork (Edit: now 6.1.3). I ran into the breaking change explained here:
Change
------
Functions on AudioPluginInstance that can add parameters have been made
private.
Possible Issues
---------------
Code implementing custom plugin formats may stop building if it calls these
functions.
Workaround
----------
When implementing custom plugin formats, ensure that the plugin parameters
derive from AudioPluginInstance::HostedParameter and then use
addHostedParameter, addHostedParameterGroup or setHostedParameterTree to add
the parameters to the plugin instance.
Rationale
---------
In a plugin host, it is very important to be able to uniquely identify
parameters across different versions of the same plugin. To make this possible,
we needed to introduce a way of retrieving a unique ID for each parameter,
which is now possible using the HostedParameter class. However, we also needed
to enforce that all AudioPluginInstances can only have parameters which are of
the type HostedParameter, which required hiding the old functions.
I can’t really figure out how you’re supposed to fix existing code. There don’t seem to be any examples yet anywhere. And maybe I’m having a brain fart, but…
For example, I have an internal plugin with this in the constructor:
addParameter (panType = new AudioParameterChoice ("PANTYPE", "Pan Type", { "Linear", "-4.5 dB", "Constant Power" }, 2));
addParameter (smoothing = new AudioParameterBool ("SMOOTHING", "Smoothing", true));
addParameter (postSmoothing = new AudioParameterBool ("POSTSMOOTH", "Post Smoothing", false));
addParameter (smoothSamples = new AudioParameterInt ("SMOOTHSAMPLES", "Samples To Smooth", 0, 512, 96)); /
The variables are declared as:
AudioParameterChoice* panType;
AudioParameterBool* smoothing;
AudioParameterBool* postSmoothing;
AudioParameterInt* smoothSamples;
Can anyone provide an example of how you would translate/update this to the new HostedParameter syntax?