From b99d8330283fd574c1c60423b4f3738dc0a66fcf Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 6 Oct 2015 02:53:06 +0200 Subject: fix implicit solo on disconnect - fixes #6308 --- libs/ardour/route.cc | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 8ae9be97f8..eaf7dfa31b 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -3273,6 +3273,31 @@ Route::input_change_handler (IOChange change, void * /*src*/) } else { cancel_solo_after_disconnect (true); } +#if 1 + } else if (_soloed_by_others_upstream) { + bool cancel_solo = true; + boost::shared_ptr routes = _session.get_routes (); + 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 = (*i)->direct_feeds_according_to_reality (shared_from_this(), &sends_only); + if (does_feed && !sends_only) { + if ((*i)->soloed()) { + cancel_solo = false; + break; + } + } + } + if (cancel_solo) { + cancel_solo_after_disconnect (true); + } +#else + } else if (self_soloed()) { +#endif + // TODO propagate upstream + // see commment in output_change_handler() below } } @@ -3304,6 +3329,37 @@ Route::output_change_handler (IOChange change, void * /*src*/) } else { cancel_solo_after_disconnect (false); } +#if 1 + } else if (_soloed_by_others_downstream) { + bool cancel_solo = true; + /* 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 (); + 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()) { + cancel_solo = false; + break; + } + } + } + if (cancel_solo) { + cancel_solo_after_disconnect (false); + } +#else + } else if (self_soloed()) { + // TODO propagate change downstream to the disconnected routes + // Q: how to get the routes that were just disconnected. ? + // A: /maybe/ by diff feeds() aka fed_by() vs direct_feeds_according_to_reality() ?!? +#endif } } -- cgit v1.2.3