mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
Added a few assertions to check plugin parameter ranges.
This commit is contained in:
parent
7fab0ca15c
commit
22ab2e4b1d
3 changed files with 7 additions and 0 deletions
|
|
@ -624,8 +624,12 @@ struct AAXClasses
|
|||
AAX_Result GetParameterDefaultNormalizedValue (AAX_CParamID paramID, double* result) const override
|
||||
{
|
||||
if (! isBypassParam (paramID))
|
||||
{
|
||||
*result = (double) pluginInstance->getParameterDefaultValue (getParamIndexFromID (paramID));
|
||||
|
||||
jassert (*result >= 0 && *result <= 1.0f);
|
||||
}
|
||||
|
||||
return AAX_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -482,6 +482,8 @@ public:
|
|||
outParameterInfo.minValue = 0.0f;
|
||||
outParameterInfo.maxValue = 1.0f;
|
||||
outParameterInfo.defaultValue = juceFilter->getParameterDefaultValue (index);
|
||||
jassert (outParameterInfo.defaultValue >= outParameterInfo.minValue
|
||||
&& outParameterInfo.defaultValue <= outParameterInfo.maxValue);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
|
||||
return noErr;
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ public:
|
|||
const int numSteps = p.getParameterNumSteps (index);
|
||||
info.stepCount = (Steinberg::int32) (numSteps > 0 && numSteps < 0x7fffffff ? numSteps - 1 : 0);
|
||||
info.defaultNormalizedValue = p.getParameterDefaultValue (index);
|
||||
jassert (info.defaultNormalizedValue >= 0 && info.defaultNormalizedValue <= 1.0f);
|
||||
info.unitId = Vst::kRootUnitId;
|
||||
info.flags = p.isParameterAutomatable (index) ? Vst::ParameterInfo::kCanAutomate : 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue