+ if (!_active && !_pending_active) {
+ _meter->reset ();
+ _output->silence (nframes);
+ _active = _pending_active;
+ return;
+ }
+
+ // we have to copy the input, because deliver_output() may alter the buffers
+ // in-place, which a send must never do.
+
+ BufferSet& sendbufs = _session.get_mix_buffers (bufs.count());
+ sendbufs.read_from (bufs, nframes);
+ assert(sendbufs.count() == bufs.count());
+
+ /* gain control */
+
+ _amp->set_gain_automation_buffer (_session.send_gain_automation_buffer ());
+ _amp->setup_gain_automation (start_frame, end_frame, nframes);
+ _amp->run (sendbufs, start_frame, end_frame, nframes, true);
+
+ _delayline->run (sendbufs, start_frame, end_frame, nframes, true);
+
+ /* deliver to outputs */
+
+ Delivery::run (sendbufs, start_frame, end_frame, nframes, true);