Skip to content
Permalink
Browse files

VST3: Fixed an issue where the program number was calculated incorrec…

…tly when the host requests a program change
  • Loading branch information...
hogliux committed Jul 11, 2017
1 parent 276d760 commit 4b4b1714234859df464fb4e25abc5b43eeea90e5
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp
@@ -1917,7 +1917,7 @@ class JuceVST3Component : public Vst::IComponent,
else if (vstParamID == JuceVST3EditController::paramPreset)
{
auto numPrograms = pluginInstance->getNumPrograms();
auto programValue = roundToInt (value * numPrograms);
auto programValue = roundToInt (value * (jmax (0, numPrograms - 1)));

if (numPrograms > 1 && isPositiveAndBelow (programValue, numPrograms)
&& programValue != pluginInstance->getCurrentProgram())

0 comments on commit 4b4b171

Please sign in to comment.
You can’t perform that action at this time.