mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix for bypass parameter handling in AAX.
This commit is contained in:
parent
662680d1f5
commit
f3d59a0f2f
1 changed files with 14 additions and 15 deletions
|
|
@ -574,28 +574,27 @@ struct AAXClasses
|
|||
|
||||
AAX_Result SetParameterNormalizedValue (AAX_CParamID paramID, double newValue) override
|
||||
{
|
||||
if (! isBypassParam (paramID))
|
||||
{
|
||||
if (AAX_IParameter* p = const_cast<AAX_IParameter*> (mParameterManager.GetParameterByID (paramID)))
|
||||
p->SetValueWithFloat ((float) newValue);
|
||||
if (isBypassParam (paramID))
|
||||
return AAX_CEffectParameters::SetParameterNormalizedValue (paramID, newValue);
|
||||
|
||||
pluginInstance->setParameter (getParamIndexFromID (paramID), (float) newValue);
|
||||
}
|
||||
if (AAX_IParameter* p = const_cast<AAX_IParameter*> (mParameterManager.GetParameterByID (paramID)))
|
||||
p->SetValueWithFloat ((float) newValue);
|
||||
|
||||
pluginInstance->setParameter (getParamIndexFromID (paramID), (float) newValue);
|
||||
return AAX_SUCCESS;
|
||||
}
|
||||
|
||||
AAX_Result SetParameterNormalizedRelative (AAX_CParamID paramID, double newValue) override
|
||||
AAX_Result SetParameterNormalizedRelative (AAX_CParamID paramID, double newDeltaValue) override
|
||||
{
|
||||
if (! isBypassParam (paramID))
|
||||
{
|
||||
const int paramIndex = getParamIndexFromID (paramID);
|
||||
const float oldValue = pluginInstance->getParameter (paramIndex);
|
||||
pluginInstance->setParameter (paramIndex, jlimit (0.0f, 1.0f, (float) (oldValue + newValue)));
|
||||
if (isBypassParam (paramID))
|
||||
return AAX_CEffectParameters::SetParameterNormalizedRelative (paramID, newDeltaValue);
|
||||
|
||||
if (AAX_IParameter* p = const_cast<AAX_IParameter*> (mParameterManager.GetParameterByID (paramID)))
|
||||
p->SetValueWithFloat ((float) newValue);
|
||||
}
|
||||
const int paramIndex = getParamIndexFromID (paramID);
|
||||
const float newValue = pluginInstance->getParameter (paramIndex) + (float) newDeltaValue;
|
||||
pluginInstance->setParameter (paramIndex, jlimit (0.0f, 1.0f, newValue));
|
||||
|
||||
if (AAX_IParameter* p = const_cast<AAX_IParameter*> (mParameterManager.GetParameterByID (paramID)))
|
||||
p->SetValueWithFloat (newValue);
|
||||
|
||||
return AAX_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue