1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

VST3: Fixed an assertion when JUCE_FORCE_LEGACY_PARAM_IDS=1 due to getProgramParameter() returning the wrong parameter

This commit is contained in:
ed 2021-03-29 16:42:19 +01:00
parent 52fbaa6042
commit af4b727b8a

View file

@ -262,7 +262,7 @@ public:
//==============================================================================
static const FUID iid;
Array<Vst::ParamID> vstParamIDs;
Vst::ParamID bypassParamID = 0, programParamID = 0;
Vst::ParamID bypassParamID = 0, programParamID = static_cast<Vst::ParamID> (paramPreset);
bool bypassIsRegularParameter = false;
private:
@ -355,7 +355,8 @@ private:
juceParameters.params.add (ownedProgramParameter.get());
programParamID = static_cast<Vst::ParamID> (forceLegacyParamIDs ? i++ : paramPreset);
if (forceLegacyParamIDs)
programParamID = static_cast<Vst::ParamID> (i++);
vstParamIDs.add (programParamID);
paramMap.set (static_cast<int32> (programParamID), ownedProgramParameter.get());