summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-09 17:44:39 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-09 17:44:39 +0000
commit69c88d165dfd3bf373a708d19bfedaa7672acec5 (patch)
tree4920d214837cc388d34b53e3b2ae2ca78905ca7d /libs/ardour/route.cc
parent0ed06420c2364a038f9909255bda93d2d134d5cc (diff)
Alert the user if a connection is made which causes
feedback, and preserve the route graph in the state that it was in before the feedback was introduced. The intent being to simplify the code, reduce the number of areas of code which must consider feedback, and fix a few bugs. git-svn-id: svn://localhost/ardour2/branches/3.0@10510 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 0b5ccdc53d..d07faf506c 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -81,7 +81,7 @@ PBD::Signal0<void> Route::RemoteControlIDChange;
Route::Route (Session& sess, string name, Flag flg, DataType default_type)
: SessionObject (sess, name)
, Automatable (sess)
- , GraphNode (sess.route_graph)
+ , GraphNode (sess._process_graph)
, _active (true)
, _signal_latency (0)
, _initial_delay (0)
@@ -744,7 +744,7 @@ Route::set_solo_isolated (bool yn, void *src)
}
bool sends_only;
- bool does_feed = direct_feeds (*i, &sends_only); // we will recurse anyway, so don't use ::feeds()
+ bool does_feed = direct_feeds_according_to_graph (*i, &sends_only); // we will recurse anyway, so don't use ::feeds()
if (does_feed && !sends_only) {
(*i)->set_solo_isolated (yn, (*i)->route_group());
@@ -2644,14 +2644,14 @@ Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
}
bool
-Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
+Route::direct_feeds_according_to_reality (boost::shared_ptr<Route> other, bool* via_send_only)
{
DEBUG_TRACE (DEBUG::Graph, string_compose ("Feeds? %1\n", _name));
if (_output->connected_to (other->input())) {
DEBUG_TRACE (DEBUG::Graph, string_compose ("\tdirect FEEDS %2\n", other->name()));
- if (only_send) {
- *only_send = false;
+ if (via_send_only) {
+ *via_send_only = false;
}
return true;
@@ -2665,8 +2665,8 @@ Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
if ((iop = boost::dynamic_pointer_cast<IOProcessor>(*r)) != 0) {
if (iop->feeds (other)) {
DEBUG_TRACE (DEBUG::Graph, string_compose ("\tIOP %1 does feed %2\n", iop->name(), other->name()));
- if (only_send) {
- *only_send = true;
+ if (via_send_only) {
+ *via_send_only = true;
}
return true;
} else {
@@ -2682,6 +2682,12 @@ Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
return false;
}
+bool
+Route::direct_feeds_according_to_graph (boost::shared_ptr<Route> other, bool* via_send_only)
+{
+ return _session._current_route_graph.has (shared_from_this (), other, via_send_only);
+}
+
/** Called from the (non-realtime) butler thread when the transport is stopped */
void
Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool did_locate, bool can_flush_processors)