diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index dd3c66bfb7..5533e4e045 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -120,6 +120,11 @@ Amp::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t /*end_sampl _current_gain = lpf; } + /* used it, don't do it again until setup_gain_automation() is + called successfully. + */ + _apply_gain_automation = false; + } else { /* manual (scalar) gain */ gain_t const target_gain = _gain_control->get_value(); diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index f3b401fc02..89c9c19b91 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -54,7 +54,6 @@ public: void setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, samplecnt_t nframes); bool apply_gain_automation() const { return _apply_gain_automation; } - void apply_gain_automation(bool yn) { _apply_gain_automation = yn; } XMLNode& state (bool full); int set_state (const XMLNode&, int version); diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index 58c7cd8c8f..344e92b2f4 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -232,7 +232,6 @@ Auditioner::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_s BufferSet& bufs = _session.get_route_buffers (n_process_buffers()); _silent = false; - _amp->apply_gain_automation(false); if (_queue_panic) { MidiBuffer& mbuf (bufs.get_midi (0)); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index a3ff8c1fa5..598efec633 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -340,9 +340,6 @@ Route::process_output_buffers (BufferSet& bufs, start_sample + _trim->output_latency (), end_sample + _trim->output_latency (), nframes); - } else { - _amp->apply_gain_automation (false); - _trim->apply_gain_automation (false); } /* Tell main outs what to do about monitoring. We do this so that @@ -3585,8 +3582,6 @@ Route::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sam _meter->run (bufs, start_sample, end_sample, 0.0, nframes, true); } - _amp->apply_gain_automation (false); - _trim->apply_gain_automation (false); passthru (bufs, start_sample, end_sample, nframes, 0, true); flush_processor_buffers_locked (nframes); @@ -3612,7 +3607,6 @@ Route::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample } _silent = false; - _amp->apply_gain_automation(false); BufferSet& bufs = _session.get_route_buffers (n_process_buffers ()); diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 48235417a5..57891968b6 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -493,8 +493,6 @@ Track::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sam be_silent = false; } - _amp->apply_gain_automation (false); - /* if have_internal_generator, or .. */ if (be_silent) {