OSC Accept int in first parameter in path commands as well as float.

This commit is contained in:
Len Ovens 2016-10-23 18:45:25 -07:00
parent 53e9337eba
commit dd015e09a7

View file

@ -886,7 +886,7 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
}
ret = 0;
} else if (argc == 1 && types[0] == 'f') { // single float -- probably TouchOSC
} else
if (!strncmp (path, "/strip/gain/", 12) && strlen (path) > 12) {
// in dB
int ssid = atoi (&path[12]);
@ -911,42 +911,42 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
}
else if (!strncmp (path, "/strip/mute/", 12) && strlen (path) > 12) {
int ssid = atoi (&path[12]);
route_mute (ssid, argv[0]->f == 1.0, msg);
route_mute (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/solo/", 12) && strlen (path) > 12) {
int ssid = atoi (&path[12]);
route_solo (ssid, argv[0]->f == 1.0, msg);
route_solo (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/monitor_input/", 21) && strlen (path) > 21) {
int ssid = atoi (&path[21]);
route_monitor_input (ssid, argv[0]->f == 1.0, msg);
route_monitor_input (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/monitor_disk/", 20) && strlen (path) > 20) {
int ssid = atoi (&path[20]);
route_monitor_disk (ssid, argv[0]->f == 1.0, msg);
route_monitor_disk (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/recenable/", 17) && strlen (path) > 17) {
int ssid = atoi (&path[17]);
route_recenable (ssid, argv[0]->f == 1.0, msg);
route_recenable (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/record_safe/", 19) && strlen (path) > 19) {
int ssid = atoi (&path[19]);
route_recsafe (ssid, argv[0]->f == 1.0, msg);
route_recsafe (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/expand/", 14) && strlen (path) > 14) {
int ssid = atoi (&path[14]);
strip_expand (ssid, argv[0]->f == 1.0, msg);
strip_expand (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/strip/select/", 14) && strlen (path) > 14) {
int ssid = atoi (&path[14]);
strip_gui_select (ssid, argv[0]->f == 1.0, msg);
strip_gui_select (ssid, argv[0]->i, msg);
ret = 0;
}
else if (!strncmp (path, "/select/send_gain/", 18) && strlen (path) > 18) {
@ -984,10 +984,11 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
sel_eq_shape (ssid, argv[0]->f, msg);
ret = 0;
}
}
if ((ret && _debugmode == Unhandled)) {
debugmsg (_("Unhandled OSC message"), path, types, argv, argc);
} else if ((!ret && _debugmode != Unhandled)) {
debugmsg (_("OSC"), path, types, argv, argc);
}
return ret;