From c9e85c91fef4211ac8d92e9b884186d27a0e9333 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 27 Jan 2016 11:38:14 -0500 Subject: [PATCH] return relevant AutomationControl for send_level_controllable() in Ardour --- libs/ardour/route.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index ff765ad89d..9c724980f0 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -5512,7 +5512,11 @@ Route::send_level_controllable (uint32_t n) const const uint32_t port_id = port_channel_post_aux1_level + (2*n); // gtk2_ardour/mixbus_ports.h return boost::dynamic_pointer_cast (plug->control (Evoral::Parameter (ARDOUR::PluginAutomation, 0, port_id))); #else - return boost::shared_ptr(); + boost::shared_ptr s = boost::dynamic_pointer_cast(nth_send (n)); + if (!s) { + return boost::shared_ptr(); + } + return s->gain_control (); #endif } @@ -5531,6 +5535,11 @@ Route::send_enable_controllable (uint32_t n) const const uint32_t port_id = port_channel_post_aux1_asgn + (2*n); // gtk2_ardour/mixbus_ports.h return boost::dynamic_pointer_cast (plug->control (Evoral::Parameter (ARDOUR::PluginAutomation, 0, port_id))); #else + /* although Ardour sends have enable/disable as part of the Processor + API, it is not exposed as a controllable. + + XXX: we should fix this. + */ return boost::shared_ptr(); #endif } -- 2.30.2