Properly expose "well known" comp_redux output.

This commit is contained in:
Robin Gareus 2017-04-12 21:13:14 +02:00
parent 7a489dd553
commit d64ca9be08
5 changed files with 12 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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>(); }

View File

@ -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
}

View File

@ -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()) {