summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2018-10-19 08:49:30 -0700
committerLen Ovens <len@ovenwerks.net>2018-10-19 08:51:29 -0700
commit777fe3c68fef42d8fee79432830787bcebdfcb59 (patch)
tree4b0d87eea0d882eab29a04256b482fb17dad23b1 /libs/ardour/route.cc
parent070f370e40d6257bd5ab6248999701f25af36973 (diff)
Add personal monitor sends
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc49
1 files changed, 47 insertions, 2 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 1eca850da3..746abc6efd 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3192,6 +3192,44 @@ Route::add_aux_send (boost::shared_ptr<Route> route, boost::shared_ptr<Processor
return 0;
}
+int
+Route::add_personal_send (boost::shared_ptr<Route> route)
+{
+ assert (route != _session.monitor_out ());
+ boost::shared_ptr<Processor> before = before_processor_for_placement (PreFader);
+
+ {
+ Glib::Threads::RWLock::ReaderLock rm (_processor_lock);
+
+ for (ProcessorList::iterator x = _processors.begin(); x != _processors.end(); ++x) {
+
+ boost::shared_ptr<InternalSend> d = boost::dynamic_pointer_cast<InternalSend> (*x);
+
+ if (d && d->target_route() == route) {
+ /* already listening via the specified IO: do nothing */
+ return 0;
+ }
+ }
+ }
+
+ try {
+
+ boost::shared_ptr<InternalSend> listener;
+
+ {
+ Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
+ listener.reset (new InternalSend (_session, _pannable, _mute_master, boost::dynamic_pointer_cast<ARDOUR::Route>(shared_from_this()), route, Delivery::Personal));
+ }
+
+ add_processor (listener, before);
+
+ } catch (failed_constructor& err) {
+ return -1;
+ }
+
+ return 0;
+}
+
void
Route::remove_aux_or_listen (boost::shared_ptr<Route> route)
{
@@ -4656,6 +4694,7 @@ Route::setup_invisible_processors ()
*/
ProcessorList new_processors;
+ ProcessorList personal_sends;
ProcessorList::iterator dr;
ProcessorList::iterator dw;
@@ -4666,8 +4705,8 @@ Route::setup_invisible_processors ()
if ((*i)->display_to_user ()) {
new_processors.push_back (*i);
}
- else if (auxsnd && auxsnd->is_aux ()) {
- new_processors.push_back (*i);
+ else if (auxsnd && auxsnd->is_personal ()) {
+ personal_sends.push_back (*i);
}
}
@@ -4720,6 +4759,12 @@ Route::setup_invisible_processors ()
new_processors.insert (meter_point, _meter);
}
+ /* Personal Sends */
+
+ for (ProcessorList::iterator i = personal_sends.begin(); i != personal_sends.end(); ++i) {
+ new_processors.insert (amp, (*i));
+ }
+
/* MONITOR SEND */
if (_monitor_send && !is_monitor ()) {