delete sur->sel_obs;
sur->sel_obs = 0;
}
- if (s) {
+ bool feedback_on = sur->feedback.to_ulong();
+ if (s && feedback_on) {
OSCSelectObserver* sel_fb = new OSCSelectObserver (s, addr, sur->gainmode, sur->feedback);
s->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
sur->sel_obs = sel_fb;
} else if (sur->expand_enable) {
sur->expand = 0;
sur->expand_enable = false;
- if (_select) {
+ if (_select && feedback_on) {
OSCSelectObserver* sel_fb = new OSCSelectObserver (_select, addr, sur->gainmode, sur->feedback);
_select->DropReferences.connect (*this, MISSING_INVALIDATOR, boost::bind (&OSC::recalcbanks, this), this);
sur->sel_obs = sel_fb;
}
- } else {
+ } else if (feedback_on) {
route_send_fail ("select", sur->expand, 0 , addr);
}
+ if (!feedback_on) {
+ return 0;
+ }
//update buttons on surface
int b_s = sur->bank_size;
if (!b_s) { // bank size 0 means we need to know how many strips there are.
if (!yn) return 0;
if (!session) {
- route_send_fail ("select", ssid, 0, get_address (msg));
return -1;
}
OSCSurface *sur = get_surface(get_address (msg));
if (s) {
SetStripableSelection (s);
} else {
- route_send_fail ("select", ssid, 0, get_address (msg));
+ if ((int) (sur->feedback.to_ulong())) {
+ route_send_fail ("select", ssid, 0, get_address (msg));
+ }
}
return 0;
OSCSelectObserver::~OSCSelectObserver ()
{
-
strip_connections.drop_connections ();
// all strip buttons should be off and faders 0 and etc.
- clear_strip ("/select/expand", 0);
if (feedback[0]) { // buttons are separate feedback
+ clear_strip ("/select/expand", 0);
text_message ("/select/name", " ");
text_message ("/select/comment", " ");
clear_strip ("/select/mute", 0);
{
//need to check feedback for [13]
eq_connections.drop_connections ();
- clear_strip ("/select/eq_hpf", 0);
- clear_strip ("/select/eq_enable", 0);
+ if (_strip->eq_hpf_controllable ()) {
+ clear_strip ("/select/eq_hpf", 0);
+ }
+ if (_strip->eq_enable_controllable ()) {
+ clear_strip ("/select/eq_enable", 0);
+ }
for (uint32_t i = 1; i <= _strip->eq_band_cnt (); i++) {
text_with_id ("/select/eq_band_name", i, " ");