|
|
|
@@ -38,14 +38,16 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete |
|
|
|
bool meta,
|
|
|
|
bool automatable,
|
|
|
|
bool discrete,
|
|
|
|
AudioProcessorParameter::Category category)
|
|
|
|
AudioProcessorParameter::Category category,
|
|
|
|
bool boolean)
|
|
|
|
: AudioProcessorParameterWithID (parameterID, paramName, labelText, category),
|
|
|
|
owner (s), valueToTextFunction (valueToText), textToValueFunction (textToValue),
|
|
|
|
range (r), value (defaultVal), defaultValue (defaultVal),
|
|
|
|
listenersNeedCalling (true),
|
|
|
|
isMetaParam (meta),
|
|
|
|
isAutomatableParam (automatable),
|
|
|
|
isDiscreteParam (discrete)
|
|
|
|
isDiscreteParam (discrete),
|
|
|
|
isBooleanParam (boolean)
|
|
|
|
{
|
|
|
|
state.addListener (this);
|
|
|
|
needsUpdate.set (1);
|
|
|
|
@@ -152,6 +154,7 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete |
|
|
|
bool isMetaParameter() const override { return isMetaParam; }
|
|
|
|
bool isAutomatable() const override { return isAutomatableParam; }
|
|
|
|
bool isDiscrete() const override { return isDiscreteParam; }
|
|
|
|
bool isBoolean() const override { return isBooleanParam; }
|
|
|
|
|
|
|
|
AudioProcessorValueTreeState& owner;
|
|
|
|
ValueTree state;
|
|
|
|
@@ -162,7 +165,7 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete |
|
|
|
float value, defaultValue;
|
|
|
|
Atomic<int> needsUpdate;
|
|
|
|
bool listenersNeedCalling;
|
|
|
|
const bool isMetaParam, isAutomatableParam, isDiscreteParam;
|
|
|
|
const bool isMetaParam, isAutomatableParam, isDiscreteParam, isBooleanParam;
|
|
|
|
|
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Parameter)
|
|
|
|
};
|
|
|
|
@@ -184,7 +187,8 @@ AudioProcessorParameterWithID* AudioProcessorValueTreeState::createAndAddParamet |
|
|
|
bool isMetaParameter,
|
|
|
|
bool isAutomatableParameter,
|
|
|
|
bool isDiscreteParameter,
|
|
|
|
AudioProcessorParameter::Category category)
|
|
|
|
AudioProcessorParameter::Category category,
|
|
|
|
bool isBooleanParameter)
|
|
|
|
{
|
|
|
|
// All parameters must be created before giving this manager a ValueTree state!
|
|
|
|
jassert (! state.isValid());
|
|
|
|
@@ -192,7 +196,7 @@ AudioProcessorParameterWithID* AudioProcessorValueTreeState::createAndAddParamet |
|
|
|
Parameter* p = new Parameter (*this, paramID, paramName, labelText, r,
|
|
|
|
defaultVal, valueToTextFunction, textToValueFunction,
|
|
|
|
isMetaParameter, isAutomatableParameter,
|
|
|
|
isDiscreteParameter, category);
|
|
|
|
isDiscreteParameter, category, isBooleanParameter);
|
|
|
|
processor.addParameter (p);
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|