X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fio_processor.cc;h=91247d5082dd62c6c993f524e4b2945817075813;hb=4dc34d5fd9f7d400c60f4a3aac14804b0f4c4e20;hp=2f42c724bf2716d0f2089e7bb063ac7a632a6917;hpb=79f91c7a205d981d2b8cc15e32a6da02d8423065;p=ardour.git diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc index 2f42c724bf..91247d5082 100644 --- a/libs/ardour/io_processor.cc +++ b/libs/ardour/io_processor.cc @@ -24,7 +24,6 @@ #include #include -#include #include "pbd/xml++.h" #include "pbd/enumwriter.h" @@ -89,7 +88,6 @@ IOProcessor::IOProcessor (Session& s, boost::shared_ptr in, boost::shared_pt IOProcessor::~IOProcessor () { - notify_callbacks (); } void @@ -133,7 +131,6 @@ IOProcessor::state (bool full_state) node.add_property ("own-output", "yes"); if (_output) { XMLNode& o (_output->state (full_state)); - // o.name() = X_("output"); node.add_child_nocopy (o); } } else { @@ -152,7 +149,7 @@ IOProcessor::set_state (const XMLNode& node, int version) const XMLProperty *prop; const XMLNode *io_node = 0; - Processor::set_state(node); + Processor::set_state(node, version); if ((prop = node.property ("own-input")) != 0) { _own_input = string_is_affirmative (prop->value()); @@ -166,17 +163,26 @@ IOProcessor::set_state (const XMLNode& node, int version) XMLNodeList nlist = node.children(); XMLNodeIterator niter; + const string instr = enum_2_string (IO::Input); + const string outstr = enum_2_string (IO::Output); if (_own_input) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "input") { - io_node = (*niter); - break; + const XMLProperty* prop; + if ((prop = (*niter)->property ("name")) != 0) { + if (prop->value() == _name) { + if ((prop = (*niter)->property ("direction")) != 0) { + if (prop->value() == instr) { + io_node = (*niter); + break; + } + } + } } } if (io_node) { - _input->set_state(*io_node); + _input->set_state(*io_node, version); // legacy sessions: use IO name if ((prop = node.property ("name")) == 0) { @@ -184,28 +190,37 @@ IOProcessor::set_state (const XMLNode& node, int version) } } else { - /* no input */ + /* no input, which is OK */ } } if (_own_output) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - if ((*niter)->name() == "output") { - io_node = (*niter); - break; + if ((*niter)->name() == "IO") { + const XMLProperty* prop; + if ((prop = (*niter)->property ("name")) != 0) { + if (prop->value() == _name) { + if ((prop = (*niter)->property ("direction")) != 0) { + if (prop->value() == outstr) { + io_node = (*niter); + break; + } + } + } + } } } if (io_node) { - _output->set_state(*io_node); + _output->set_state(*io_node, version); // legacy sessions: use IO name if ((prop = node.property ("name")) == 0) { set_name (_output->name()); } } else { - /* no output */ + /* no output, which is OK */ } }