OSC: change group sharing to individual commands
Send less feedback for group name and sharing
This commit is contained in:
parent
ed04660940
commit
b2259e11d0
@ -2593,38 +2593,58 @@ OSC::parse_sel_group (const char *path, const char* types, lo_arg **argv, int ar
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!strncmp (path, X_("/select/group/sharing"), 21)) {
|
else if (strcmp (path, X_("/select/group/gain")) == 0) {
|
||||||
if (argc == 9) {
|
if (argc == 1) {
|
||||||
if (rg->is_gain() != (bool) argv[0]->i) {
|
rg->set_gain ((bool) value);
|
||||||
rg->set_gain ((bool) argv[0]->i);
|
ret = 0;
|
||||||
}
|
}
|
||||||
if (rg->is_relative() != (bool) argv[1]->i) {
|
}
|
||||||
rg->set_relative ((bool) argv[1]->i, this);
|
else if (strcmp (path, X_("/select/group/relative")) == 0) {
|
||||||
}
|
if (argc == 1) {
|
||||||
if (rg->is_mute() != (bool) argv[2]->i) {
|
rg->set_relative ((bool) value, this);
|
||||||
rg->set_mute ((bool) argv[2]->i);
|
ret = 0;
|
||||||
}
|
}
|
||||||
if (rg->is_solo() != (bool) argv[3]->i) {
|
}
|
||||||
rg->set_solo ((bool) argv[3]->i);
|
else if (strcmp (path, X_("/select/group/mute")) == 0) {
|
||||||
}
|
if (argc == 1) {
|
||||||
if (rg->is_recenable() != (bool) argv[4]->i) {
|
rg->set_mute ((bool) value);
|
||||||
rg->set_recenable ((bool) argv[4]->i);
|
ret = 0;
|
||||||
}
|
}
|
||||||
if (rg->is_select() != (bool) argv[5]->i) {
|
}
|
||||||
rg->set_select ((bool) argv[5]->i);
|
else if (strcmp (path, X_("/select/group/solo")) == 0) {
|
||||||
}
|
if (argc == 1) {
|
||||||
if (rg->is_route_active() != (bool) argv[6]->i) {
|
rg->set_solo ((bool) value);
|
||||||
rg->set_route_active ((bool) argv[6]->i);
|
ret = 0;
|
||||||
}
|
}
|
||||||
if (rg->is_color() != (bool) argv[7]->i) {
|
}
|
||||||
rg->set_color ((bool) argv[7]->i);
|
else if (strcmp (path, X_("/select/group/recenable")) == 0) {
|
||||||
}
|
if (argc == 1) {
|
||||||
if (rg->is_monitoring() != (bool) argv[8]->i) {
|
rg->set_recenable ((bool) value);
|
||||||
rg->set_monitoring ((bool) argv[8]->i);
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (strcmp (path, X_("/select/group/select")) == 0) {
|
||||||
|
if (argc == 1) {
|
||||||
|
rg->set_select ((bool) value);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (strcmp (path, X_("/select/group/active")) == 0) {
|
||||||
|
if (argc == 1) {
|
||||||
|
rg->set_route_active ((bool) value);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (strcmp (path, X_("/select/group/color")) == 0) {
|
||||||
|
if (argc == 1) {
|
||||||
|
rg->set_color ((bool) value);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (strcmp (path, X_("/select/group/monitoring")) == 0) {
|
||||||
|
if (argc == 1) {
|
||||||
|
rg->set_monitoring ((bool) value);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
|
||||||
PBD::warning << "OSC: Sharing can only be set if all 9 parameters are sent." << endmsg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,8 @@ OSCSelectObserver::OSCSelectObserver (OSC& o, ARDOUR::Session& s, ArdourSurface:
|
|||||||
} else {
|
} else {
|
||||||
plug_id = -1;
|
plug_id = -1;
|
||||||
}
|
}
|
||||||
|
_group_name = "\n";
|
||||||
|
_group_sharing[15] = 1;
|
||||||
refresh_strip (sur->select, sur->nsends, gainmode, true);
|
refresh_strip (sur->select, sur->nsends, gainmode, true);
|
||||||
set_expand (sur->expand_enable);
|
set_expand (sur->expand_enable);
|
||||||
}
|
}
|
||||||
@ -302,6 +304,15 @@ OSCSelectObserver::clear_observer ()
|
|||||||
_osc.float_message (X_("/select/polarity"), 0, addr);
|
_osc.float_message (X_("/select/polarity"), 0, addr);
|
||||||
_osc.float_message (X_("/select/n_inputs"), 0, addr);
|
_osc.float_message (X_("/select/n_inputs"), 0, addr);
|
||||||
_osc.float_message (X_("/select/n_outputs"), 0, addr);
|
_osc.float_message (X_("/select/n_outputs"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/gain"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/relative"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/mute"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/solo"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/recenable"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/select"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/active"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/color"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/monitoring"), 0, addr);
|
||||||
if (gainmode) {
|
if (gainmode) {
|
||||||
_osc.float_message (X_("/select/fader"), 0, addr);
|
_osc.float_message (X_("/select/fader"), 0, addr);
|
||||||
} else {
|
} else {
|
||||||
@ -665,13 +676,18 @@ void
|
|||||||
OSCSelectObserver::group_name ()
|
OSCSelectObserver::group_name ()
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route> (_strip);
|
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route> (_strip);
|
||||||
|
string new_name = " ";
|
||||||
RouteGroup *rg = rt->route_group();
|
RouteGroup *rg = rt->route_group();
|
||||||
if (rg) {
|
if (rg) {
|
||||||
_osc.text_message (X_("/select/group"), rg->name(), addr);
|
new_name = rg->name();
|
||||||
} else {
|
|
||||||
_osc.text_message (X_("/select/group"), " ", addr);
|
|
||||||
}
|
}
|
||||||
|
if (new_name != _group_name) {
|
||||||
|
_osc.text_message (X_("/select/group"), new_name, addr);
|
||||||
|
_group_name = new_name;
|
||||||
|
_group_sharing[15] = 1;
|
||||||
|
}
|
||||||
|
_osc.send_group_list (addr);
|
||||||
|
group_sharing (rg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -684,22 +700,55 @@ OSCSelectObserver::group_sharing (RouteGroup *rgc)
|
|||||||
if (rg != rgc) {
|
if (rg != rgc) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lo_message reply = lo_message_new ();
|
if (rg->is_gain () != _group_sharing[0] || _group_sharing[15]) {
|
||||||
lo_message_add_int32 (reply, rg->is_gain ());
|
_group_sharing[0] = rg->is_gain ();
|
||||||
lo_message_add_int32 (reply, rg->is_relative ());
|
_osc.int_message (X_("/select/group/gain"), _group_sharing[0], addr);
|
||||||
lo_message_add_int32 (reply, rg->is_mute ());
|
}
|
||||||
lo_message_add_int32 (reply, rg->is_solo ());
|
if (rg->is_relative () != _group_sharing[1] || _group_sharing[15]) {
|
||||||
lo_message_add_int32 (reply, rg->is_recenable ());
|
_group_sharing[1] = rg->is_relative ();
|
||||||
lo_message_add_int32 (reply, rg->is_select ());
|
_osc.int_message (X_("/select/group/relative"), _group_sharing[1], addr);
|
||||||
lo_message_add_int32 (reply, rg->is_route_active ());
|
}
|
||||||
lo_message_add_int32 (reply, rg->is_color ());
|
if (rg->is_mute () != _group_sharing[2] || _group_sharing[15]) {
|
||||||
lo_message_add_int32 (reply, rg->is_monitoring ());
|
_group_sharing[2] = rg->is_mute ();
|
||||||
lo_send_message (addr, "/select/group/sharing", reply);
|
_osc.int_message (X_("/select/group/mute"), _group_sharing[2], addr);
|
||||||
lo_message_free (reply);
|
}
|
||||||
|
if (rg->is_solo () != _group_sharing[3] || _group_sharing[15]) {
|
||||||
|
_group_sharing[3] = rg->is_solo ();
|
||||||
|
_osc.int_message (X_("/select/group/solo"), _group_sharing[3], addr);
|
||||||
|
}
|
||||||
|
if (rg->is_recenable () != _group_sharing[4] || _group_sharing[15]) {
|
||||||
|
_group_sharing[4] = rg->is_recenable ();
|
||||||
|
_osc.int_message (X_("/select/group/recenable"), _group_sharing[4], addr);
|
||||||
|
}
|
||||||
|
if (rg->is_select () != _group_sharing[5] || _group_sharing[15]) {
|
||||||
|
_group_sharing[5] = rg->is_select ();
|
||||||
|
_osc.int_message (X_("/select/group/select"), _group_sharing[5], addr);
|
||||||
|
}
|
||||||
|
if (rg->is_route_active () != _group_sharing[6] || _group_sharing[15]) {
|
||||||
|
_group_sharing[6] = rg->is_route_active ();
|
||||||
|
_osc.int_message (X_("/select/group/active"), _group_sharing[6], addr);
|
||||||
|
}
|
||||||
|
if (rg->is_color () != _group_sharing[7] || _group_sharing[15]) {
|
||||||
|
_group_sharing[7] = rg->is_color ();
|
||||||
|
_osc.int_message (X_("/select/group/color"), _group_sharing[7], addr);
|
||||||
|
}
|
||||||
|
if (rg->is_monitoring () != _group_sharing[8] || _group_sharing[15]) {
|
||||||
|
_group_sharing[8] = rg->is_monitoring ();
|
||||||
|
_osc.int_message (X_("/select/group/monitoring"), _group_sharing[8], addr);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_osc.int_message (X_("/select/group/gain"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/relative"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/mute"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/solo"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/recenable"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/select"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/active"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/color"), 0, addr);
|
||||||
|
_osc.int_message (X_("/select/group/monitoring"), 0, addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_group_sharing[15] = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -92,8 +92,10 @@ class OSCSelectObserver
|
|||||||
uint32_t plug_size;
|
uint32_t plug_size;
|
||||||
std::vector<int> plug_params;
|
std::vector<int> plug_params;
|
||||||
int eq_bands;
|
int eq_bands;
|
||||||
bool _tick_busy;
|
|
||||||
uint32_t _expand;
|
uint32_t _expand;
|
||||||
|
std::string _group_name;
|
||||||
|
std::bitset<16> _group_sharing;
|
||||||
|
bool _tick_busy;
|
||||||
ARDOUR::Session* session;
|
ARDOUR::Session* session;
|
||||||
|
|
||||||
void name_changed (const PBD::PropertyChange& what_changed);
|
void name_changed (const PBD::PropertyChange& what_changed);
|
||||||
|
Loading…
Reference in New Issue
Block a user