lalala
August 29, 2022, 10:10am
1
Parameter’s valueToTextFunction used to be optional and we could pass nullptr.
With the AudioProcessorValueTreeStateParameterAttributes changes this will crash.
The deprecated Parameter’s constructor should check for nullptr here l501 :
float defaultParameterValue,
std::function<String (float)> valueToTextFunction,
std::function<float (const String&)> textToValueFunction,
bool isMetaParameter = false,
bool isAutomatableParameter = true,
bool isDiscrete = false,
AudioProcessorParameter::Category parameterCategory = AudioProcessorParameter::genericParameter,
bool isBoolean = false)
: Parameter (parameterID,
parameterName,
valueRange,
defaultParameterValue,
AudioProcessorValueTreeStateParameterAttributes().withLabel (labelText)
.withStringFromValueFunction (adaptSignature (std::move (valueToTextFunction)))
.withValueFromStringFunction (std::move (textToValueFunction))
.withMeta (isMetaParameter)
.withAutomatable (isAutomatableParameter)
.withDiscrete (isDiscrete)
.withCategory (parameterCategory)
.withBoolean (isBoolean))
{
1 Like