diff --git a/libs/ardour/route_dag.cc b/libs/ardour/route_dag.cc index 6a6e8d2bbd..3b13cf9415 100644 --- a/libs/ardour/route_dag.cc +++ b/libs/ardour/route_dag.cc @@ -146,7 +146,9 @@ struct RouteRecEnabledComparator } }; - +/** Perform a topological sort of a list of routes using a directed graph representing connections. + * @return Sorted list of routes, or 0 if the graph contains cycles (feedback loops). + */ boost::shared_ptr ARDOUR::topological_sort ( boost::shared_ptr routes, @@ -189,7 +191,8 @@ ARDOUR::topological_sort ( } if (!edges.empty ()) { - cout << "Feedback detected.\n"; + /* There are cycles in the graph, so we can't do a topological sort */ + return boost::shared_ptr (); } return sorted_routes;