summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-21 00:51:56 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-21 00:51:56 +0000
commitca248db48eb1517c18b79dd94115769d10175bdf (patch)
tree22382ee8df93b29ed1e940e87f36721cae9a4207 /libs/ardour/session.cc
parente3fc510d160e6c08e153a33266ff34058acdb9dc (diff)
Thought-to-be-fix for #2794; fix route process order sorting.
git-svn-id: svn://localhost/ardour2/branches/3.0@8064 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index dbb899a4d4..f5df3a0e6b 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1298,10 +1298,13 @@ Session::set_default_fade (float /*steepness*/, float /*fade_msecs*/)
}
struct RouteSorter {
+ /** @return true to run r1 before r2, otherwise false */
bool operator() (boost::shared_ptr<Route> r1, boost::shared_ptr<Route> r2) {
if (r2->feeds (r1)) {
+ /* r1 fed by r2; run r2 early */
return false;
} else if (r1->feeds (r2)) {
+ /* r2 fed by r1; run r1 early */
return true;
} else {
if (r1->not_fed ()) {
@@ -1313,7 +1316,13 @@ struct RouteSorter {
return true;
}
} else {
- return r1->order_key(N_("signal")) < r2->order_key(N_("signal"));
+ if (r2->not_fed()) {
+ /* r1 has connections, r2 does not; run r2 early */
+ return false;
+ } else {
+ /* both r1 and r2 have connections, but not to each other. just use signal order */
+ return r1->order_key(N_("signal")) < r2->order_key(N_("signal"));
+ }
}
}
}