diff options
author | Robin Gareus <robin@gareus.org> | 2017-05-14 00:16:02 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-05-14 00:17:11 +0200 |
commit | 3d26a29e8a2ed1286091fda2dd480bf5bbebe365 (patch) | |
tree | 2f5157292d2c39fa668ff5d2acafab477b7cb101 /libs/surfaces | |
parent | 3e2004aa73b4807bd470b3a816b5343a5127d7a7 (diff) |
Sanitize "well-known" ctrl API
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/faderport8/faderport8.cc | 8 | ||||
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 16 | ||||
-rw-r--r-- | libs/surfaces/osc/osc.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/osc/osc_select_observer.cc | 9 |
4 files changed, 19 insertions, 18 deletions
diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index 7a2448e939..8d2898c2f2 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -1064,13 +1064,13 @@ FaderPort8::build_well_known_processor_ctrls (boost::shared_ptr<Stripable> s, bo int cnt = s->eq_band_cnt(); #ifdef MIXBUS32C - PUSH_BACK_NON_NULL ("Flt In", s->filter_enable_controllable ()); - PUSH_BACK_NON_NULL ("HP Freq", s->eq_hpf_controllable ()); - PUSH_BACK_NON_NULL ("LP Freq", s->eq_lpf_controllable ()); + PUSH_BACK_NON_NULL ("Flt In", s->filter_enable_controllable (true)); // both HP/LP + PUSH_BACK_NON_NULL ("HP Freq", s->filter_freq_controllable (true)); + PUSH_BACK_NON_NULL ("LP Freq", s->filter_freq_controllable (false)); PUSH_BACK_NON_NULL ("EQ In", s->eq_enable_controllable ()); #elif defined (MIXBUS) PUSH_BACK_NON_NULL ("EQ In", s->eq_enable_controllable ()); - PUSH_BACK_NON_NULL ("HP Freq", s->eq_hpf_controllable ()); + PUSH_BACK_NON_NULL ("HP Freq", s->filter_freq_controllable (true)); #endif for (int band = 0; band < cnt; ++band) { diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 1ec72d501c..c42906bc18 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -529,7 +529,7 @@ Strip::notify_eq_change (AutomationType type, uint32_t band, bool force_update) break; #ifndef MIXBUS32C case EQHPF: - control = r->eq_hpf_controllable (); + control = r->filter_freq_controllable (true); break; #endif default: @@ -581,13 +581,13 @@ Strip::notify_dyn_change (AutomationType type, bool force_update, bool propagate break; #ifdef MIXBUS32C case EQHPF: - control = r->eq_hpf_controllable (); + control = r->filter_freq_controllable (true); break; case EQLPF: - control = r->eq_lpf_controllable (); + control = r->filter_freq_controllable (false); break; case EQFilterEnable: - control = r->filter_enable_controllable (); + control = r->filter_enable_controllable (true); // both HP/LP break; #endif default: @@ -1546,9 +1546,9 @@ Strip::setup_dyn_vpot (boost::shared_ptr<Stripable> r) boost::shared_ptr<AutomationControl> ec = r->comp_enable_controllable (); #ifdef MIXBUS32C //Mixbus32C needs to spill the filter controls into the comp section - boost::shared_ptr<AutomationControl> hpfc = r->eq_hpf_controllable (); - boost::shared_ptr<AutomationControl> lpfc = r->eq_lpf_controllable (); - boost::shared_ptr<AutomationControl> fec = r->filter_enable_controllable (); + boost::shared_ptr<AutomationControl> hpfc = r->filter_freq_controllable (true); + boost::shared_ptr<AutomationControl> lpfc = r->filter_freq_controllable (false); + boost::shared_ptr<AutomationControl> fec = r->filter_enable_controllable (true); // shared HP/LP #endif uint32_t pos = _surface->mcp().global_index (*this); @@ -1731,7 +1731,7 @@ Strip::setup_eq_vpot (boost::shared_ptr<Stripable> r) switch (parameter) { #ifndef MIXBUS32C case 0: /* first control after band parameters */ - pc = r->eq_hpf_controllable(); + pc = r->filter_freq_controllable(true); param = EQHPF; break; case 1: /* second control after band parameters */ diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 634fcc674e..0a412ee7de 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -3706,8 +3706,8 @@ OSC::sel_eq_hpf (float val, lo_message msg) s = _select; } if (s) { - if (s->eq_hpf_controllable()) { - s->eq_hpf_controllable()->set_value (s->eq_hpf_controllable()->interface_to_internal (val), PBD::Controllable::NoGroup); + if (s->filter_freq_controllable(true)) { + s->filter_freq_controllable(true)->set_value (s->filter_freq_controllable(true)->interface_to_internal (val), PBD::Controllable::NoGroup); return 0; } } diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc index 35d35841d9..151b00b6e0 100644 --- a/libs/surfaces/osc/osc_select_observer.cc +++ b/libs/surfaces/osc/osc_select_observer.cc @@ -624,10 +624,11 @@ void OSCSelectObserver::eq_init() { // HPF and enable are special case, rest are in bands - if (_strip->eq_hpf_controllable ()) { - _strip->eq_hpf_controllable ()->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf"), _strip->eq_hpf_controllable()), OSC::instance()); - change_message ("/select/eq_hpf", _strip->eq_hpf_controllable()); + if (_strip->filter_freq_controllable (true)) { + _strip->filter_freq_controllable (true)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf"), _strip->filter_freq_controllable (true)), OSC::instance()); + change_message ("/select/eq_hpf", _strip->filter_freq_controllable(true)); } + // TODO LPF and LPF/HPF enable ctrls. if (_strip->eq_enable_controllable ()) { _strip->eq_enable_controllable ()->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->eq_enable_controllable()), OSC::instance()); enable_message ("/select/eq_enable", _strip->eq_enable_controllable()); @@ -666,7 +667,7 @@ OSCSelectObserver::eq_end () { //need to check feedback for [13] eq_connections.drop_connections (); - if (_strip->eq_hpf_controllable ()) { + if (_strip->filter_freq_controllable (true)) { send_float ("/select/eq_hpf", 0); } if (_strip->eq_enable_controllable ()) { |