mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
VST3: Fixed an issue where the program number was calculated incorrectly when the host requests a program change
This commit is contained in:
parent
276d760cb5
commit
4b4b171423
1 changed files with 1 additions and 1 deletions
|
|
@ -1917,7 +1917,7 @@ public:
|
|||
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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue