cleanup up cleanup at session destruction; clarify the meaning of 3 signals (DropRefe...
[ardour.git] / libs / ardour / port_insert.cc
index 3b02bf41daa6672e1c9ef91720a03763efc8f491..dee661db4157c5e05e7bd781aca1b16066b2a41b 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <string>
 
-#include <sigc++/bind.h>
 
 #include "pbd/failed_constructor.h"
 #include "pbd/xml++.h"
@@ -62,11 +61,10 @@ PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLN
 
 PortInsert::~PortInsert ()
 {
-       GoingAway ();
 }
 
 void
-PortInsert::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
+PortInsert::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes, bool)
 {
        if (_output->n_ports().n_total() == 0) {
                return;
@@ -78,7 +76,7 @@ PortInsert::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nf
                goto out;
        }
 
-       _out->run (bufs, start_frame, end_frame, nframes);
+       _out->run (bufs, start_frame, end_frame, nframes, true);
        _input->collect_input (bufs, nframes, ChanCount::ZERO);
 
   out:
@@ -184,7 +182,23 @@ PortInsert::set_name (const std::string& name)
 {
        bool ret = Processor::set_name (name);
 
-       ret = (_input->set_name (name) || _output->set_name (name));
+       ret = (ret && _input->set_name (name) && _output->set_name (name));
 
        return ret;
 }
+
+void
+PortInsert::activate ()
+{
+       IOProcessor::activate ();
+
+       _out->activate ();
+}
+
+void
+PortInsert::deactivate ()
+{
+       IOProcessor::deactivate ();
+
+       _out->deactivate ();
+}