X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Froute.cc;h=44d79587405749badf5e689a954e16d3c91a23f8;hb=5956e864e7ceb1285e43f376796aaec5230d16e9;hp=411f3dc80178753001bb9dd7d894b800a117bf1c;hpb=7a36ce49256a5aa96084b1f94b4c88bceb083fa5;p=ardour.git diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 411f3dc801..44d7958740 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -907,6 +907,12 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr ProcessorList::iterator loc; boost::shared_ptr fanout; + if (g_atomic_int_get (&_pending_process_reorder)) { + /* we need to flush any pending re-order changes */ + Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); + apply_processor_changes_rt (); + } + if (before) { loc = find(_processors.begin(), _processors.end(), before); if (loc == _processors.end ()) { @@ -3383,46 +3389,56 @@ Route::output_change_handler (IOChange change, void * /*src*/) io_changed (); /* EMIT SIGNAL */ } - if (_solo_control->soloed_by_others_downstream()) { - int sbod = 0; - /* checking all all downstream routes for - * explicit of implict solo is a rather drastic measure, - * ideally the input_change_handler() of the other route - * would propagate the change to us. + if ((change.type & IOChange::ConnectionsChanged)) { + + /* do this ONLY if connections have changed. Configuration + * changes do not, by themselves alter solo upstream or + * downstream status. */ - boost::shared_ptr routes = _session.get_routes (); - if (_output->connected()) { - for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { - if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) { - continue; - } - bool sends_only; - bool does_feed = direct_feeds_according_to_reality (*i, &sends_only); - if (does_feed && !sends_only) { - if ((*i)->soloed()) { - ++sbod; - break; + + if (_solo_control->soloed_by_others_downstream()) { + int sbod = 0; + /* checking all all downstream routes for + * explicit of implict solo is a rather drastic measure, + * ideally the input_change_handler() of the other route + * would propagate the change to us. + */ + boost::shared_ptr routes = _session.get_routes (); + if (_output->connected()) { + for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { + if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) { + continue; + } + bool sends_only; + bool does_feed = direct_feeds_according_to_reality (*i, &sends_only); + if (does_feed && !sends_only) { + if ((*i)->soloed()) { + ++sbod; + break; + } } } } - } - int delta = sbod - _solo_control->soloed_by_others_downstream(); - if (delta <= 0) { - // do not allow new connections to change implicit solo (no propagation) - _solo_control->mod_solo_by_others_downstream (delta); - // Session::route_solo_changed() does not propagate indirect solo-changes - // propagate upstream to tracks - for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { - if ((*i).get() == this || !can_solo()) { - continue; - } - bool sends_only; - bool does_feed = (*i)->feeds (shared_from_this(), &sends_only); - if (delta != 0 && does_feed && !sends_only) { - (*i)->solo_control()->mod_solo_by_others_downstream (delta); + + int delta = sbod - _solo_control->soloed_by_others_downstream(); + if (delta <= 0) { + // do not allow new connections to change implicit solo (no propagation) + _solo_control->mod_solo_by_others_downstream (delta); + // Session::route_solo_changed() does not propagate indirect solo-changes + // propagate upstream to tracks + boost::shared_ptr shared_this = shared_from_this(); + for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { + if ((*i).get() == this || !can_solo()) { + continue; + } + bool sends_only; + bool does_feed = (*i)->feeds (shared_this, &sends_only); + if (delta != 0 && does_feed && !sends_only) { + (*i)->solo_control()->mod_solo_by_others_downstream (delta); + } } - } + } } } }