mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
OSC: Squelch select feedback when no feedback is configured.
This commit is contained in:
parent
198b8f6b58
commit
8ddeca133b
2 changed files with 17 additions and 9 deletions
|
|
@ -2277,21 +2277,25 @@ OSC::_strip_select (boost::shared_ptr<Stripable> s, lo_address addr)
|
|||
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.
|
||||
|
|
@ -2346,7 +2350,6 @@ OSC::strip_gui_select (int ssid, int yn, lo_message msg)
|
|||
if (!yn) return 0;
|
||||
|
||||
if (!session) {
|
||||
route_send_fail ("select", ssid, 0, get_address (msg));
|
||||
return -1;
|
||||
}
|
||||
OSCSurface *sur = get_surface(get_address (msg));
|
||||
|
|
@ -2355,7 +2358,9 @@ OSC::strip_gui_select (int ssid, int yn, lo_message 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;
|
||||
|
|
|
|||
|
|
@ -179,11 +179,10 @@ OSCSelectObserver::OSCSelectObserver (boost::shared_ptr<Stripable> s, lo_address
|
|||
|
||||
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);
|
||||
|
|
@ -634,8 +633,12 @@ OSCSelectObserver::eq_end ()
|
|||
{
|
||||
//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, " ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue