summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-12 21:13:14 +0200
committerRobin Gareus <robin@gareus.org>2017-04-12 21:14:50 +0200
commitd64ca9be08331756e936018ea4d06404faa2ca90 (patch)
tree70b93c7a02c207e99ac88c1e8e555bba2bf22ba0
parent7a489dd5532ae53ab943adc1f38c1bc24b4474c9 (diff)
Properly expose "well known" comp_redux output.
-rw-r--r--libs/ardour/ardour/route.h2
-rw-r--r--libs/ardour/ardour/stripable.h3
-rw-r--r--libs/ardour/ardour/vca.h2
-rw-r--r--libs/ardour/route.cc13
-rw-r--r--libs/surfaces/mackie/strip.cc5
5 files changed, 12 insertions, 13 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 3ac2d6dda6..9313df2f0c 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -520,7 +520,7 @@ public:
boost::shared_ptr<AutomationControl> comp_speed_controllable () const;
boost::shared_ptr<AutomationControl> comp_mode_controllable () const;
boost::shared_ptr<AutomationControl> comp_makeup_controllable () const;
- boost::shared_ptr<AutomationControl> comp_redux_controllable () const;
+ boost::shared_ptr<ReadOnlyControl> comp_redux_controllable () const;
/* @param mode must be supplied by the comp_mode_controllable(). All other values
* result in undefined behaviour
diff --git a/libs/ardour/ardour/stripable.h b/libs/ardour/ardour/stripable.h
index 099a048016..2484c26345 100644
--- a/libs/ardour/ardour/stripable.h
+++ b/libs/ardour/ardour/stripable.h
@@ -37,6 +37,7 @@ class StripableColorDialog;
namespace ARDOUR {
class AutomationControl;
+class ReadOnlyControl;
class GainControl;
class PeakMeter;
class SoloControl;
@@ -144,7 +145,7 @@ class LIBARDOUR_API Stripable : public SessionObject {
virtual boost::shared_ptr<AutomationControl> comp_speed_controllable () const = 0;
virtual boost::shared_ptr<AutomationControl> comp_mode_controllable () const = 0;
virtual boost::shared_ptr<AutomationControl> comp_makeup_controllable () const = 0;
- virtual boost::shared_ptr<AutomationControl> comp_redux_controllable () const = 0;
+ virtual boost::shared_ptr<ReadOnlyControl> comp_redux_controllable () const = 0;
/* @param mode must be supplied by the comp_mode_controllable(). All other values
* result in undefined behaviour
diff --git a/libs/ardour/ardour/vca.h b/libs/ardour/ardour/vca.h
index 63ba55f5b4..0977001927 100644
--- a/libs/ardour/ardour/vca.h
+++ b/libs/ardour/ardour/vca.h
@@ -132,7 +132,7 @@ class LIBARDOUR_API VCA : public Stripable,
boost::shared_ptr<AutomationControl> comp_speed_controllable () const { return boost::shared_ptr<AutomationControl>(); }
boost::shared_ptr<AutomationControl> comp_mode_controllable () const { return boost::shared_ptr<AutomationControl>(); }
boost::shared_ptr<AutomationControl> comp_makeup_controllable () const { return boost::shared_ptr<AutomationControl>(); }
- boost::shared_ptr<AutomationControl> comp_redux_controllable () const { return boost::shared_ptr<AutomationControl>(); }
+ boost::shared_ptr<ReadOnlyControl> comp_redux_controllable () const { return boost::shared_ptr<ReadOnlyControl>(); }
std::string comp_mode_name (uint32_t mode) const { return std::string(); }
std::string comp_speed_name (uint32_t mode) const { return std::string(); }
boost::shared_ptr<AutomationControl> send_level_controllable (uint32_t n) const { return boost::shared_ptr<AutomationControl>(); }
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 1b5c0579c1..4ea5eecd13 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -5197,20 +5197,23 @@ Route::comp_makeup_controllable () const
return boost::shared_ptr<AutomationControl>();
#endif
}
-boost::shared_ptr<AutomationControl>
+boost::shared_ptr<ReadOnlyControl>
Route::comp_redux_controllable () const
{
#ifdef MIXBUS
boost::shared_ptr<PluginInsert> comp = ch_comp();
if (!comp) {
- return boost::shared_ptr<AutomationControl>();
+ return boost::shared_ptr<ReadOnlyControl>();
+ }
+ if (is_master()) {
+ return comp->control_output (2);
+ } else {
+ return comp->control_output (6);
}
- // XXX redux is an output-port, query via comp->plugin(0)->get_parameter (6)
- return boost::dynamic_pointer_cast<ARDOUR::AutomationControl> (comp->control (Evoral::Parameter (ARDOUR::PluginAutomation, 0, 6)));
#else
- return boost::shared_ptr<AutomationControl>();
+ return boost::shared_ptr<ReadOnlyControl>();
#endif
}
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc
index e7ce72cff8..e396af575c 100644
--- a/libs/surfaces/mackie/strip.cc
+++ b/libs/surfaces/mackie/strip.cc
@@ -575,9 +575,6 @@ Strip::notify_dyn_change (AutomationType type, bool force_update, bool propagate
case CompMakeup:
control = r->comp_makeup_controllable ();
break;
- case CompRedux:
- control = r->comp_redux_controllable ();
- break;
case CompEnable:
control = r->comp_enable_controllable ();
break;
@@ -1532,7 +1529,6 @@ Strip::setup_dyn_vpot (boost::shared_ptr<Stripable> r)
boost::shared_ptr<AutomationControl> sc = r->comp_speed_controllable ();
boost::shared_ptr<AutomationControl> mc = r->comp_mode_controllable ();
boost::shared_ptr<AutomationControl> kc = r->comp_makeup_controllable ();
- boost::shared_ptr<AutomationControl> rc = r->comp_redux_controllable ();
boost::shared_ptr<AutomationControl> ec = r->comp_enable_controllable ();
uint32_t pos = _surface->mcp().global_index (*this);
@@ -1548,7 +1544,6 @@ Strip::setup_dyn_vpot (boost::shared_ptr<Stripable> r)
if (sc) { available.push_back (sc); params.push_back (CompSpeed); }
if (mc) { available.push_back (mc); params.push_back (CompMode); }
if (kc) { available.push_back (kc); params.push_back (CompMakeup); }
- if (rc) { available.push_back (rc); params.push_back (CompRedux); }
if (ec) { available.push_back (ec); params.push_back (CompEnable); }
if (pos >= available.size()) {