Move a few declarations to first use.
[ardour.git] / libs / ardour / delivery.cc
index f9ff3be83e3a635e2a155a337cda00532293e719..3b95c5ee3d521918e22e2cd424202ab19a071316 100644 (file)
@@ -47,7 +47,6 @@ using namespace std;
 using namespace PBD;
 using namespace ARDOUR;
 
-PBD::Signal1<void, pframes_t> Delivery::CycleStart;
 PBD::Signal0<int>             Delivery::PannersLegal;
 bool                          Delivery::panners_legal = false;
 
@@ -72,8 +71,6 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pann
        if (_output) {
                _output->changed.connect_same_thread (*this, boost::bind (&Delivery::output_changed, this, _1, _2));
        }
-
-       CycleStart.connect_same_thread (*this, boost::bind (&Delivery::cycle_start, this, _1));
 }
 
 /* deliver to a new IO object */
@@ -96,14 +93,21 @@ Delivery::Delivery (Session& s, boost::shared_ptr<Pannable> pannable, boost::sha
        if (_output) {
                _output->changed.connect_same_thread (*this, boost::bind (&Delivery::output_changed, this, _1, _2));
        }
-
-       CycleStart.connect_same_thread (*this, boost::bind (&Delivery::cycle_start, this, _1));
 }
 
 
 Delivery::~Delivery()
 {
-       DEBUG_TRACE (DEBUG::Destruction, string_compose ("delivery %1 destructor\n", _name));
+       DEBUG_TRACE (DEBUG::Destruction, string_compose ("delivery %1 destructor\n", _name));   
+
+       /* this object should vanish from any signal callback lists
+          that it is on before we get any further. The full qualification
+          of the method name is not necessary, but is here to make it 
+          clear that this call is about signals, not data flow connections.
+       */
+
+       ScopedConnectionList::drop_connections ();
+
        delete _output_buffers;
 }
 
@@ -124,12 +128,6 @@ Delivery::display_name () const
        }
 }
 
-void
-Delivery::cycle_start (pframes_t /*nframes*/)
-{
-       _no_outs_cuz_we_no_monitor = false;
-}
-
 bool
 Delivery::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
 {