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 ()
{