X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Freturn.cc;h=cb61b0767aa025a2d2e569de509b79db6f58bea5;hb=24b514797ab265bf48eb93d6c2c812ce5232fdba;hp=4f9e8b958a4aad86db00df92f50d4fd9e3133dfb;hpb=92848355801abdfcb81d620cd0adeeea74a3accd;p=ardour.git diff --git a/libs/ardour/return.cc b/libs/ardour/return.cc index 4f9e8b958a..cb61b0767a 100644 --- a/libs/ardour/return.cc +++ b/libs/ardour/return.cc @@ -24,6 +24,7 @@ #include "ardour/amp.h" #include "ardour/audioengine.h" #include "ardour/buffer_set.h" +#include "ardour/gain_control.h" #include "ardour/io.h" #include "ardour/meter.h" #include "ardour/return.h" @@ -49,7 +50,11 @@ Return::Return (Session& s, bool internal) { /* never muted */ - _amp.reset (new Amp (_session)); + boost::shared_ptr gl (new AutomationList (Evoral::Parameter (GainAutomation))); + _gain_control = boost::shared_ptr (new GainControl (_session, Evoral::Parameter (GainAutomation), gl)); + add_control (_gain_control); + + _amp.reset (new Amp (_session, X_("Fader"), _gain_control, true)); _meter.reset (new PeakMeter (_session, name())); } @@ -81,7 +86,7 @@ Return::set_state (const XMLNode& node, int version) { XMLNodeList nlist = node.children(); XMLNodeIterator niter; - const XMLProperty* prop; + XMLProperty const * prop; const XMLNode* insert_node = &node; /* Return has regular IO automation (gain, pan) */ @@ -110,7 +115,7 @@ Return::set_state (const XMLNode& node, int version) } void -Return::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool) +Return::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, double speed, pframes_t nframes, bool) { if ((!_active && !_pending_active) || _input->n_ports() == ChanCount::ZERO) { return; @@ -122,13 +127,13 @@ Return::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pfra // Can't automate gain for sends or returns yet because we need different buffers // so that we don't overwrite the main automation data for the route amp // _amp->setup_gain_automation (start_frame, end_frame, nframes); - _amp->run (bufs, start_frame, end_frame, nframes, true); + _amp->run (bufs, start_frame, end_frame, speed, nframes, true); if (_metering) { if (_amp->gain_control()->get_value() == 0) { _meter->reset(); } else { - _meter->run (bufs, start_frame, end_frame, nframes, true); + _meter->run (bufs, start_frame, end_frame, speed, nframes, true); } } @@ -159,4 +164,3 @@ Return::configure_io (ChanCount in, ChanCount out) return true; } -