PBD::Signal1<void, pframes_t> InternalSend::CycleStart;
-InternalSend::InternalSend (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role, bool ignore_bitslot)
+InternalSend::InternalSend (Session& s,
+ boost::shared_ptr<Pannable> p,
+ boost::shared_ptr<MuteMaster> mm,
+ boost::shared_ptr<Route> sendfrom,
+ boost::shared_ptr<Route> sendto,
+ Delivery::Role role,
+ bool ignore_bitslot)
: Send (s, p, mm, role, ignore_bitslot)
+ , _send_from (sendfrom)
{
- if (sendto) {
- if (use_target (sendto)) {
- throw failed_constructor();
- }
- }
+ if (sendto) {
+ if (use_target (sendto)) {
+ throw failed_constructor();
+ }
+ }
init_gain ();
+ _send_from->DropReferences.connect_same_thread (source_connection, boost::bind (&InternalSend::send_from_going_away, this));
CycleStart.connect_same_thread (*this, boost::bind (&InternalSend::cycle_start, this, _1));
}
reset_panner();
}
+void
+InternalSend::send_from_going_away ()
+{
+ _send_from.reset();
+}
+
void
InternalSend::send_to_going_away ()
{
// we have to copy the input, because we may alter the buffers with the amp
// in-place, which a send must never do.
- if (_panshell && !_panshell->bypassed()) {
+ if (_panshell && !_panshell->bypassed() && role() != Listen) {
_panshell->run (bufs, mixbufs, start_frame, end_frame, nframes);
} else {
if (role() == Listen) {
_amp->setup_gain_automation (start_frame, end_frame, nframes);
_amp->run (mixbufs, start_frame, end_frame, nframes, true);
+ _delayline->run (mixbufs, start_frame, end_frame, nframes, true);
+
/* consider metering */
if (_metering) {