OSC: Allow surface to change route comment.
This commit is contained in:
@@ -569,6 +569,7 @@ OSC::register_callbacks()
|
||||
REGISTER_CALLBACK (serv, X_("/select/recenable"), "i", sel_recenable);
|
||||
REGISTER_CALLBACK (serv, X_("/select/record_safe"), "i", sel_recsafe);
|
||||
REGISTER_CALLBACK (serv, X_("/select/name"), "s", sel_rename);
|
||||
REGISTER_CALLBACK (serv, X_("/select/comment"), "s", sel_comment);
|
||||
REGISTER_CALLBACK (serv, X_("/select/group"), "s", sel_group);
|
||||
REGISTER_CALLBACK (serv, X_("/select/mute"), "i", sel_mute);
|
||||
REGISTER_CALLBACK (serv, X_("/select/solo"), "i", sel_solo);
|
||||
@@ -3725,6 +3726,31 @@ OSC::sel_rename (char *newname, lo_message msg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
OSC::sel_comment (char *newcomment, lo_message msg) {
|
||||
if (!session) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
OSCSurface *sur = get_surface(get_address (msg));
|
||||
boost::shared_ptr<Stripable> s;
|
||||
if (sur->expand_enable) {
|
||||
s = get_strip (sur->expand, get_address (msg));
|
||||
} else {
|
||||
s = _select;
|
||||
}
|
||||
if (s) {
|
||||
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route> (s);
|
||||
if (!rt) {
|
||||
PBD::warning << "OSC: can not set comment on VCAs." << endmsg;
|
||||
return -1;
|
||||
}
|
||||
rt->set_comment (newcomment, this);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
OSC::strip_group (int ssid, char *group, lo_message msg) {
|
||||
if (!session) {
|
||||
@@ -3760,6 +3786,7 @@ OSC::strip_select_group (boost::shared_ptr<Stripable> s, char *group)
|
||||
if (s) {
|
||||
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route> (s);
|
||||
if (!rt) {
|
||||
PBD::warning << "OSC: VCAs can not be part of a group." << endmsg;
|
||||
return -1;
|
||||
}
|
||||
RouteGroup *rg = rt->route_group();
|
||||
|
||||
@@ -495,6 +495,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||
PATH_CALLBACK1_MSG(use_group,f);
|
||||
PATH_CALLBACK1_MSG_s(sel_group,s);
|
||||
PATH_CALLBACK1_MSG_s(sel_rename,s);
|
||||
PATH_CALLBACK1_MSG_s(sel_comment,s);
|
||||
PATH_CALLBACK1_MSG(sel_recenable,i);
|
||||
PATH_CALLBACK1_MSG(sel_recsafe,i);
|
||||
PATH_CALLBACK1_MSG(sel_mute,i);
|
||||
@@ -718,6 +719,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||
int monitor_set_mono (uint32_t state);
|
||||
int sel_group (char *g, lo_message msg);
|
||||
int sel_rename (char *n, lo_message msg);
|
||||
int sel_comment (char *c, lo_message msg);
|
||||
int sel_recenable (uint32_t state, lo_message msg);
|
||||
int sel_recsafe (uint32_t state, lo_message msg);
|
||||
int sel_mute (uint32_t state, lo_message msg);
|
||||
|
||||
Reference in New Issue
Block a user