| @@ -886,9 +886,9 @@ public: | |||||
| outParameterInfo.minValue = 0.0f; | outParameterInfo.minValue = 0.0f; | ||||
| outParameterInfo.maxValue = getMaximumParameterValue (index); | outParameterInfo.maxValue = getMaximumParameterValue (index); | ||||
| outParameterInfo.defaultValue = juceFilter->getParameterDefaultValue (index); | |||||
| outParameterInfo.defaultValue = juceFilter->getParameterDefaultValue (index) * getMaximumParameterValue (index); | |||||
| jassert (outParameterInfo.defaultValue >= outParameterInfo.minValue | jassert (outParameterInfo.defaultValue >= outParameterInfo.minValue | ||||
| && outParameterInfo.defaultValue <= outParameterInfo.maxValue); | |||||
| && outParameterInfo.defaultValue <= outParameterInfo.maxValue); | |||||
| return noErr; | return noErr; | ||||
| } | } | ||||
| @@ -60,7 +60,8 @@ protected: | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| float value, defaultValue; | |||||
| float value; | |||||
| const float defaultValue; | |||||
| float getValue() const override; | float getValue() const override; | ||||
| void setValue (float newValue) override; | void setValue (float newValue) override; | ||||
| @@ -71,8 +71,9 @@ protected: | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| float value, defaultValue; | |||||
| float value; | |||||
| const int maxIndex; | const int maxIndex; | ||||
| const float defaultValue; | |||||
| float getValue() const override; | float getValue() const override; | ||||
| void setValue (float newValue) override; | void setValue (float newValue) override; | ||||
| @@ -77,7 +77,8 @@ protected: | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| float value, defaultValue; | |||||
| float value; | |||||
| const float defaultValue; | |||||
| float getValue() const override; | float getValue() const override; | ||||
| void setValue (float newValue) override; | void setValue (float newValue) override; | ||||
| @@ -70,7 +70,8 @@ protected: | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| const int minValue, maxValue, rangeOfValues; | const int minValue, maxValue, rangeOfValues; | ||||
| float value, defaultValue; | |||||
| float value; | |||||
| const float defaultValue; | |||||
| float getValue() const override; | float getValue() const override; | ||||
| void setValue (float newValue) override; | void setValue (float newValue) override; | ||||
| @@ -148,8 +148,8 @@ AudioParameterChoice::AudioParameterChoice (const String& idToUse, const String& | |||||
| const StringArray& c, int def, const String& labelToUse) | const StringArray& c, int def, const String& labelToUse) | ||||
| : AudioProcessorParameterWithID (idToUse, nameToUse, labelToUse), choices (c), | : AudioProcessorParameterWithID (idToUse, nameToUse, labelToUse), choices (c), | ||||
| value ((float) def), | value ((float) def), | ||||
| defaultValue (convertTo0to1 (def)), | |||||
| maxIndex (choices.size() - 1) | |||||
| maxIndex (choices.size() - 1), | |||||
| defaultValue (convertTo0to1 (def)) | |||||
| { | { | ||||
| jassert (choices.size() > 0); // you must supply an actual set of items to choose from! | jassert (choices.size() > 0); // you must supply an actual set of items to choose from! | ||||
| } | } | ||||