Browse Source

Fixed a bug in the demo plug-in slider class

tags/2021-05-28
tpoole 8 years ago
parent
commit
31e05ad014
1 changed files with 2 additions and 8 deletions
  1. +2
    -8
      examples/audio plugin demo/Source/PluginEditor.cpp

+ 2
- 8
examples/audio plugin demo/Source/PluginEditor.cpp View File

@@ -42,13 +42,7 @@ public:
updateSliderPos(); updateSliderPos();
} }
void valueChanged() override
{
if (isMouseButtonDown())
param.setValueNotifyingHost ((float) Slider::getValue());
else
param.setValue ((float) Slider::getValue());
}
void valueChanged() override { param.setValueNotifyingHost ((float) Slider::getValue()); }
void timerCallback() override { updateSliderPos(); } void timerCallback() override { updateSliderPos(); }
@@ -63,7 +57,7 @@ public:
const float newValue = param.getValue(); const float newValue = param.getValue();
if (newValue != (float) Slider::getValue() && ! isMouseButtonDown()) if (newValue != (float) Slider::getValue() && ! isMouseButtonDown())
Slider::setValue (newValue);
Slider::setValue (newValue, NotificationType::dontSendNotification);
} }
AudioProcessorParameter& param; AudioProcessorParameter& param;


Loading…
Cancel
Save