summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-06 02:53:06 +0200
committerRobin Gareus <robin@gareus.org>2015-10-06 02:53:06 +0200
commitb99d8330283fd574c1c60423b4f3738dc0a66fcf (patch)
tree6c77b0ef8aa3098aa85647e91ebbeba7a39effc3
parent09bad018f4cc60b501919f5da0cfa106592a731f (diff)
fix implicit solo on disconnect - fixes #6308
-rw-r--r--libs/ardour/route.cc56
1 files changed, 56 insertions, 0 deletions
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<RouteList> 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<RouteList> 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
}
}