diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-15 20:45:49 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-16 16:53:39 +0200 |
commit | dee990103a1fb607ff401ec7c56e8c241074ffb5 (patch) | |
tree | cb6b4d398f36eb3d6ab95c8ff0143ccf46082a28 /libs/ardour/amp.cc | |
parent | 06ca52d5a5c405a5cb2b3f2d827edc60712412e9 (diff) |
Consistent Automation evaluation:
Rule #89: The *owner* of each automation-control is responsible to
evaluate automation of automated automation-controls (and emit Changed()
signals to notify the GUI and slaved controls).
This can happen during run(), when the Processor evaluates automation
(eg. PluginInsert does that), but needs to regardless, every cycle.
Emit Changed signal for GainControl
This follow the same concept as PluginInsert: The Changed signal
is called on demand when evaluating automation.
Diffstat (limited to 'libs/ardour/amp.cc')
-rw-r--r-- | libs/ardour/amp.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index 8760c2d426..705e79af73 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -90,6 +90,9 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, gain_t* gab = _gain_automation_buffer; assert (gab); + /* see note in PluginInsert::connect_and_run -- emit Changed signal */ + _gain_control->set_value_unchecked (gab[0]); + if (_midi_amp) { for (BufferSet::midi_iterator i = bufs.midi_begin(); i != bufs.midi_end(); ++i) { MidiBuffer& mb (*i); @@ -130,6 +133,12 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, _current_gain = Amp::apply_gain (bufs, _session.nominal_frame_rate(), nframes, _current_gain, dg, _midi_amp); + /* see note in PluginInsert::connect_and_run () + * set_value_unchecked() won't emit a signal since the value is effectively unchanged + */ + + _gain_control->Changed (false, PBD::Controllable::NoGroup); + } else if (_current_gain != GAIN_COEFF_UNITY) { /* gain has not changed, but its non-unity */ |