mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
VST3: Fixed bypass and program parameter indices when JUCE_FORCE_USE_LEGACY_PARAM_IDS=1 and AudioProcessor::getBypassParameter() is implemented
This commit is contained in:
parent
fbe95b0b07
commit
2ac46c600d
1 changed files with 3 additions and 5 deletions
|
|
@ -302,7 +302,7 @@ private:
|
|||
#endif
|
||||
|
||||
juceParameters.update (*audioProcessor, forceLegacyParamIDs);
|
||||
auto additionalLegacyParameterIDIndex = juceParameters.getNumParameters();
|
||||
auto numParameters = juceParameters.getNumParameters();
|
||||
|
||||
bool vst3WrapperProvidedBypassParam = false;
|
||||
auto* bypassParameter = audioProcessor->getBypassParameter();
|
||||
|
|
@ -333,8 +333,7 @@ private:
|
|||
{
|
||||
// we need to remain backward compatible with the old bypass id
|
||||
if (vst3WrapperProvidedBypassParam)
|
||||
vstParamID = static_cast<Vst::ParamID> ((isUsingManagedParameters() && ! forceLegacyParamIDs) ? paramBypass
|
||||
: additionalLegacyParameterIDIndex++);
|
||||
vstParamID = static_cast<Vst::ParamID> ((isUsingManagedParameters() && ! forceLegacyParamIDs) ? paramBypass : numParameters);
|
||||
|
||||
bypassParamID = vstParamID;
|
||||
}
|
||||
|
|
@ -353,8 +352,7 @@ private:
|
|||
|
||||
juceParameters.params.add (ownedProgramParameter.get());
|
||||
|
||||
programParamID = static_cast<Vst::ParamID> (forceLegacyParamIDs ? additionalLegacyParameterIDIndex++
|
||||
: paramPreset);
|
||||
programParamID = static_cast<Vst::ParamID> (forceLegacyParamIDs ? i++ : paramPreset);
|
||||
|
||||
vstParamIDs.add (programParamID);
|
||||
paramMap.set (static_cast<int32> (programParamID), ownedProgramParameter.get());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue