#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"
#include "ardour/session.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace PBD;
{
/* never muted */
- _amp.reset (new Amp (_session));
+ boost::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (GainAutomation)));
+ _gain_control = boost::shared_ptr<GainControl> (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()));
}
{
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
- const XMLProperty* prop;
+ XMLProperty const * prop;
const XMLNode* insert_node = &node;
/* Return has regular IO automation (gain, pan) */
}
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;
// 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);
}
}
}
bool
-Return::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
+Return::can_support_io_configuration (const ChanCount& in, ChanCount& out)
{
out = in + _input->n_ports();
return true;
return true;
}
-