summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-28 00:31:09 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-28 00:31:09 +0000
commit947422c0957dca63bc6a165634ab1510da60ed04 (patch)
tree1dc65a9f18782a822b40b71c2c2e2953d8096596 /libs/ardour/route.cc
parent0a87941c706a03b43ccebc229bf1df3a7a362b46 (diff)
Revert inadvertantly committed stuff from 10322.
git-svn-id: svn://localhost/ardour2/branches/3.0@10323 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc43
1 files changed, 35 insertions, 8 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index a897f5a813..a7fb05ec15 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2673,7 +2673,7 @@ Route::clear_fed_by ()
}
bool
-Route::sub_feeds (Fedby const & fed_by, boost::shared_ptr<Route> other, bool* via_sends_only)
+Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
{
const FedBy& fed_by (other->fed_by());
@@ -2694,15 +2694,42 @@ Route::sub_feeds (Fedby const & fed_by, boost::shared_ptr<Route> other, bool* vi
}
bool
-Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
+Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
{
- return sub_feeds (other->fed_by (), other, via_sends_only);
-}
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("Feeds? %1\n", _name));
-bool
-Route::direct_feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
-{
- return sub_feeds (other->direct_fed_by (), other, via_sends_only);
+ if (_output->connected_to (other->input())) {
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tdirect FEEDS %2\n", other->name()));
+ if (only_send) {
+ *only_send = false;
+ }
+
+ return true;
+ }
+
+
+ for (ProcessorList::iterator r = _processors.begin(); r != _processors.end(); ++r) {
+
+ boost::shared_ptr<IOProcessor> iop;
+
+ 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;
+ }
+ return true;
+ } else {
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tIOP %1 does NOT feed %2\n", iop->name(), other->name()));
+ }
+ } else {
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tPROC %1 is not an IOP\n", (*r)->name()));
+ }
+
+ }
+
+ DEBUG_TRACE (DEBUG::Graph, string_compose ("\tdoes NOT feed %1\n", other->name()));
+ return false;
}
/** Called from the (non-realtime) butler thread when the transport is stopped */