X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fio_processor.cc;h=3af3d67de4b36a3a69279dbbf52022f67aaa2586;hb=81ba187b1a7d129d26011b7c99eea9962ad877ee;hp=d23afce6120a6d32fbb63e341a6ce4132fd74c85;hpb=b621b28fce4942fb4505854482cddec1545f5c0f;p=ardour.git diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc index d23afce612..3af3d67de4 100644 --- a/libs/ardour/io_processor.cc +++ b/libs/ardour/io_processor.cc @@ -147,7 +147,7 @@ IOProcessor::set_state (const XMLNode& node, int version) return set_state_2X (node, version); } - const XMLProperty *prop; + XMLProperty const * prop; const XMLNode *io_node = 0; Processor::set_state(node, version); @@ -167,10 +167,10 @@ IOProcessor::set_state (const XMLNode& node, int version) XMLNodeIterator niter; const string instr = enum_2_string (IO::Input); const string outstr = enum_2_string (IO::Output); - - if (_own_input) { + + if (_own_input && _input) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = (*niter)->property ("name")) != 0) { if (_name == prop->value()) { if ((prop = (*niter)->property ("direction")) != 0) { @@ -182,25 +182,25 @@ IOProcessor::set_state (const XMLNode& node, int version) } } } - + if (io_node) { _input->set_state(*io_node, version); - + // legacy sessions: use IO name if ((prop = node.property ("name")) == 0) { set_name (_input->name()); } - + } else { /* no input, which is OK */ } - + } - - if (_own_output) { + + if (_own_output && _output) { for (niter = nlist.begin(); niter != nlist.end(); ++niter) { if ((*niter)->name() == "IO") { - const XMLProperty* prop; + XMLProperty const * prop; if ((prop = (*niter)->property ("name")) != 0) { if (_name == prop->value()) { if ((prop = (*niter)->property ("direction")) != 0) { @@ -213,10 +213,10 @@ IOProcessor::set_state (const XMLNode& node, int version) } } } - + if (io_node) { _output->set_state(*io_node, version); - + // legacy sessions: use IO name if ((prop = node.property ("name")) == 0) { set_name (_output->name()); @@ -240,7 +240,7 @@ IOProcessor::set_state_2X (const XMLNode& node, int version) } void -IOProcessor::silence (framecnt_t nframes) +IOProcessor::silence (framecnt_t nframes, framepos_t /* start_frame */) { if (_own_output && _output) { _output->silence (nframes);