summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/route.h8
-rw-r--r--libs/ardour/route.cc12
2 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index edad4fd266..44069462d1 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -567,6 +567,14 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
*/
std::string send_name (uint32_t n) const;
+ /* well known control that enables/disables sending to the master bus.
+ *
+ * In Ardour, this returns null.
+ * In Mixbus, it will return a suitable control, or null depending on
+ * the route.
+ */
+ boost::shared_ptr<AutomationControl> master_send_enable_controllable () const;
+
void protect_automation ();
enum {
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 6effb27fc4..fb417305d7 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -5571,3 +5571,15 @@ Route::send_name (uint32_t n) const
}
#endif
}
+
+boost::shared_ptr<AutomationControl>
+Route::master_send_enable_controllable () const
+{
+#ifdef MIXBUS
+ boost::shared_ptr<ARDOUR::PluginInsert> plug = ch_post();
+ assert (plug);
+ return boost::dynamic_pointer_cast<ARDOUR::AutomationControl> (plug->control (Evoral::Parameter (ARDOUR::PluginAutomation, 0, port_channel_post_mstr_assign)));
+#else
+ return boost::shared_ptr<AutomationControl>();
+#endif
+}