mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
APVTS: Send parameter change notifications more proactively
This commit is contained in:
parent
016b04c64f
commit
8480d0110a
2 changed files with 12 additions and 0 deletions
|
|
@ -65,6 +65,15 @@ bool AudioProcessorValueTreeState::Parameter::isAutomatable() const { return
|
|||
bool AudioProcessorValueTreeState::Parameter::isDiscrete() const { return discrete; }
|
||||
bool AudioProcessorValueTreeState::Parameter::isBoolean() const { return boolean; }
|
||||
|
||||
void AudioProcessorValueTreeState::Parameter::valueChanged (float newValue)
|
||||
{
|
||||
if (lastValue == newValue)
|
||||
return;
|
||||
|
||||
lastValue = newValue;
|
||||
sendValueChangedMessageToListeners (newValue);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
class AudioProcessorValueTreeState::ParameterAdapter : private AudioProcessorParameter::Listener
|
||||
{
|
||||
|
|
|
|||
|
|
@ -414,8 +414,11 @@ public:
|
|||
bool isBoolean() const override;
|
||||
|
||||
private:
|
||||
void valueChanged (float) override;
|
||||
|
||||
const float unsnappedDefault;
|
||||
const bool metaParameter, automatable, discrete, boolean;
|
||||
float lastValue = 0.0f;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue