get Delivery to disconnect from any signals it is connected to relatively early in...
[ardour.git] / libs / ardour / io_processor.cc
index 6bdac9fe199e47f6b0064f351ac5a63b7cc10d55..8e7cba0ab12eafe100cda5e2c7d3dc8c1e58ad51 100644 (file)
@@ -24,7 +24,6 @@
 #include <unistd.h>
 #include <sstream>
 
-#include <sigc++/bind.h>
 
 #include "pbd/xml++.h"
 #include "pbd/enumwriter.h"
@@ -89,7 +88,6 @@ IOProcessor::IOProcessor (Session& s, boost::shared_ptr<IO> in, boost::shared_pt
 
 IOProcessor::~IOProcessor ()
 {
-       notify_callbacks ();
 }
 
 void
@@ -148,6 +146,10 @@ IOProcessor::state (bool full_state)
 int
 IOProcessor::set_state (const XMLNode& node, int version)
 {
+       if (version < 3000) {
+               return set_state_2X (node, version);
+       }
+
        const XMLProperty *prop;
        const XMLNode *io_node = 0;
 
@@ -172,7 +174,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        const XMLProperty* prop;
                        if ((prop = (*niter)->property ("name")) != 0) {
-                               if (prop->value() == _name) {
+                               if (_name == prop->value()) {
                                        if ((prop = (*niter)->property ("direction")) != 0) {
                                                if (prop->value() == instr) {
                                                        io_node = (*niter);
@@ -202,7 +204,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
                        if ((*niter)->name() == "IO") {
                                const XMLProperty* prop;
                                if ((prop = (*niter)->property ("name")) != 0) {
-                                       if (prop->value() == _name) {
+                                       if (_name == prop->value()) {
                                                if ((prop = (*niter)->property ("direction")) != 0) {
                                                        if (prop->value() == outstr) {
                                                                io_node = (*niter);
@@ -229,14 +231,32 @@ IOProcessor::set_state (const XMLNode& node, int version)
        return 0;
 }
 
+int
+IOProcessor::set_state_2X (const XMLNode& node, int version)
+{
+       _own_input = _own_output = true;
+
+       Processor::set_state_2X (node, version);
+
+       return 0;
+}
+
 void
-IOProcessor::silence (nframes_t nframes)
+IOProcessor::silence (framecnt_t nframes)
 {
        if (_own_output && _output) {
                _output->silence (nframes);
        }
 }
 
+void
+IOProcessor::increment_port_buffer_offset (pframes_t offset)
+{
+        if (_own_output && _output) {
+                _output->increment_port_buffer_offset (offset);
+        }
+}
+
 ChanCount
 IOProcessor::natural_output_streams() const
 {