summaryrefslogtreecommitdiff
path: root/libs/ardour/internal_send.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-14 15:06:49 +0200
committerRobin Gareus <robin@gareus.org>2016-10-14 15:06:49 +0200
commitc21a0760a48ebd1d014d7ca66366477715cbb4a5 (patch)
tree81a774354d589b07d0ade301af6ce723435a940d /libs/ardour/internal_send.cc
parent88dedfcbdbf99ed3b4c87dc47b2e2a5167881882 (diff)
allow feedback (loops) from internal sends
This facilitates custom "Echo" chains: Bus 1 [FX] [aux-send to Bus 2] -> master Bus 2 [FX] -> Bus 2
Diffstat (limited to 'libs/ardour/internal_send.cc')
-rw-r--r--libs/ardour/internal_send.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index 1746b00847..241506bdea 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -49,6 +49,7 @@ InternalSend::InternalSend (Session& s,
bool ignore_bitslot)
: Send (s, p, mm, role, ignore_bitslot)
, _send_from (sendfrom)
+ , _allow_feedback (false)
{
if (sendto) {
if (use_target (sendto)) {
@@ -266,10 +267,20 @@ InternalSend::set_block_size (pframes_t nframes)
return 0;
}
+void
+InternalSend::set_allow_feedback (bool yn)
+{
+ _allow_feedback = yn;
+ _send_from->processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+}
+
bool
InternalSend::feeds (boost::shared_ptr<Route> other) const
{
- return _send_to == other;
+ if (_role == Listen || !_allow_feedback) {
+ return _send_to == other;
+ }
+ return false;
}
XMLNode&
@@ -284,6 +295,7 @@ InternalSend::state (bool full)
if (_send_to) {
node.add_property ("target", _send_to->id().to_s());
}
+ node.add_property ("allow-feedback", _allow_feedback);
return node;
}
@@ -319,6 +331,10 @@ InternalSend::set_state (const XMLNode& node, int version)
}
}
+ if ((prop = node.property (X_("allow-feedback"))) != 0) {
+ _allow_feedback = string_is_affirmative (prop->value());
+ }
+
return 0;
}