X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Froute.cc;h=21b7876aca4e0da309a58c2fe052aa40651d3b69;hb=9a3734a6bd0450faf92a8b1add2d5e052a4534ca;hp=452d611d87628c9bd064ffb5cfd94b2055f67f47;hpb=6f14394c958409a8a4153b5ab929670cc1970937;p=ardour.git diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 452d611d87..21b7876aca 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -1608,8 +1607,6 @@ Route::_reset_processor_counts (ProcessorStreams* err) } else if (boost::dynamic_pointer_cast (*r) != 0) { ++send_cnt; - } else if (boost::dynamic_pointer_cast (*r) != 0) { - ++send_cnt; } } @@ -1673,7 +1670,6 @@ Route::_reset_processor_counts (ProcessorStreams* err) for (r = _processors.begin(); r != _processors.end(); prev = r, ++r) { boost::shared_ptr s; - boost::shared_ptr is; if ((s = boost::dynamic_pointer_cast (*r)) != 0) { @@ -1687,16 +1683,6 @@ Route::_reset_processor_counts (ProcessorStreams* err) s->expect_inputs ((*prev)->output_streams()); } - } else if ((is = boost::dynamic_pointer_cast (*r)) != 0) { - - /* XXX ditto, but clean this inheritance pattern up someday soon */ - - if (r == _processors.begin()) { - is->expect_inputs (n_inputs()); - } else { - is->expect_inputs ((*prev)->output_streams()); - } - } else { max_audio = max ((*r)->output_streams ().n_audio(), max_audio); @@ -1776,87 +1762,6 @@ Route::check_some_processor_counts (list& iclist, ChanCount requ return false; } -int -Route::copy_processors (const Route& other, Placement placement, ProcessorStreams* err) -{ - ChanCount old_pmo = processor_max_outs; - - ProcessorList to_be_deleted; - - { - Glib::RWLock::WriterLock lm (_processor_lock); - ProcessorList::iterator tmp; - ProcessorList the_copy; - - the_copy = _processors; - - /* remove all relevant processors */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ) { - tmp = i; - ++tmp; - - if ((*i)->placement() == placement) { - to_be_deleted.push_back (*i); - _processors.erase (i); - } - - i = tmp; - } - - /* now copy the relevant ones from "other" */ - - for (ProcessorList::const_iterator i = other._processors.begin(); i != other._processors.end(); ++i) { - if ((*i)->placement() == placement) { - _processors.push_back (IOProcessor::clone (*i)); - } - } - - /* reset plugin stream handling */ - - if (_reset_processor_counts (err)) { - - /* FAILED COPY ATTEMPT: we have to restore order */ - - /* delete all cloned processors */ - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ) { - - tmp = i; - ++tmp; - - if ((*i)->placement() == placement) { - _processors.erase (i); - } - - i = tmp; - } - - /* restore the natural order */ - - _processors = the_copy; - processor_max_outs = old_pmo; - - /* we failed, even though things are OK again */ - - return -1; - - } else { - - /* SUCCESSFUL COPY ATTEMPT: delete the processors we removed pre-copy */ - to_be_deleted.clear (); - _user_latency = 0; - } - } - - if (processor_max_outs != old_pmo || old_pmo == ChanCount::ZERO) { - reset_panner (); - } - - processors_changed (); /* EMIT SIGNAL */ - return 0; -} - void Route::all_processors_flip () {