X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fdelivery.cc;h=3b95c5ee3d521918e22e2cd424202ab19a071316;hb=204baa31d842d4c2f833d319b6fa55e402a1bfb8;hp=3d808563de3a8782491cac47ae3684ce93ca9e8c;hpb=7bdcc127e3e42bd76b997b56ecd938b1127d790b;p=ardour.git diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index 3d808563de..3b95c5ee3d 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -47,7 +47,6 @@ using namespace std; using namespace PBD; using namespace ARDOUR; -PBD::Signal1 Delivery::CycleStart; PBD::Signal0 Delivery::PannersLegal; bool Delivery::panners_legal = false; @@ -61,8 +60,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr io, boost::shared_ptr(new PannerShell (_name, _session, pannable)); @@ -73,8 +71,6 @@ Delivery::Delivery (Session& s, boost::shared_ptr io, boost::shared_ptrchanged.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 */ @@ -86,8 +82,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr pannable, boost::sha , _current_gain (1.0) , _no_outs_cuz_we_no_monitor (false) , _mute_master (mm) - , no_panner_reset (false) - , scnt (0) + , _no_panner_reset (false) { if (pannable) { _panshell = boost::shared_ptr(new PannerShell (_name, _session, pannable)); @@ -98,14 +93,21 @@ Delivery::Delivery (Session& s, boost::shared_ptr 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; } @@ -126,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 { @@ -389,7 +385,7 @@ void Delivery::reset_panner () { if (panners_legal) { - if (!no_panner_reset) { + if (!_no_panner_reset) { if (_panshell) { _panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, pan_outs())); @@ -424,19 +420,19 @@ Delivery::panners_became_legal () void Delivery::defer_pan_reset () { - no_panner_reset = true; + _no_panner_reset = true; } void Delivery::allow_pan_reset () { - no_panner_reset = false; + _no_panner_reset = false; reset_panner (); } int -Delivery::disable_panners (void) +Delivery::disable_panners () { panners_legal = false; return 0;