summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-27 23:36:42 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-27 23:36:42 +0000
commit0a87941c706a03b43ccebc229bf1df3a7a362b46 (patch)
tree96b4fc5ff14380cd3fbc5086d0968279a33024ea /libs/ardour/route.cc
parente82944820716082626675a79f6c710057ce5787f (diff)
Minor cleanups to IO.
git-svn-id: svn://localhost/ardour2/branches/3.0@10322 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc43
1 files changed, 8 insertions, 35 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index a7fb05ec15..a897f5a813 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2673,7 +2673,7 @@ Route::clear_fed_by ()
}
bool
-Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
+Route::sub_feeds (Fedby const & fed_by, boost::shared_ptr<Route> other, bool* via_sends_only)
{
const FedBy& fed_by (other->fed_by());
@@ -2694,42 +2694,15 @@ Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
}
bool
-Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
+Route::feeds (boost::shared_ptr<Route> other, bool* via_sends_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;
- }
-
- 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()));
- }
-
- }
+ return sub_feeds (other->fed_by (), other, via_sends_only);
+}
- DEBUG_TRACE (DEBUG::Graph, string_compose ("\tdoes NOT feed %1\n", other->name()));
- return false;
+bool
+Route::direct_feeds (boost::shared_ptr<Route> other, bool* via_sends_only)
+{
+ return sub_feeds (other->direct_fed_by (), other, via_sends_only);
}
/** Called from the (non-realtime) butler thread when the transport is stopped */