mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
OSC: Some surfaces may use float for ssid. Accept this too.
This commit is contained in:
parent
b343108756
commit
d35dfa9c93
2 changed files with 26 additions and 10 deletions
|
|
@ -866,11 +866,11 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
|
||||||
len = strlen (path);
|
len = strlen (path);
|
||||||
|
|
||||||
if (strstr (path, "/automation")) {
|
if (strstr (path, "/automation")) {
|
||||||
ret = set_automation (path, argv, argc, msg);
|
ret = set_automation (path, types, argv, argc, msg);
|
||||||
|
|
||||||
} else
|
} else
|
||||||
if (strstr (path, "/touch")) {
|
if (strstr (path, "/touch")) {
|
||||||
ret = touch_detect (path, argv, argc, msg);
|
ret = touch_detect (path, types, argv, argc, msg);
|
||||||
|
|
||||||
} else
|
} else
|
||||||
if (len >= 17 && !strcmp (&path[len-15], "/#current_value")) {
|
if (len >= 17 && !strcmp (&path[len-15], "/#current_value")) {
|
||||||
|
|
@ -2207,7 +2207,7 @@ OSC::route_get_receives(lo_message msg) {
|
||||||
// strip calls
|
// strip calls
|
||||||
|
|
||||||
int
|
int
|
||||||
OSC::set_automation (const char *path, lo_arg **argv, int argc, lo_message msg)
|
OSC::set_automation (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg)
|
||||||
{
|
{
|
||||||
if (!session) return -1;
|
if (!session) return -1;
|
||||||
|
|
||||||
|
|
@ -2216,6 +2216,7 @@ OSC::set_automation (const char *path, lo_arg **argv, int argc, lo_message msg)
|
||||||
boost::shared_ptr<Stripable> strp = boost::shared_ptr<Stripable>();
|
boost::shared_ptr<Stripable> strp = boost::shared_ptr<Stripable>();
|
||||||
uint32_t ctr = 0;
|
uint32_t ctr = 0;
|
||||||
uint32_t aut = 0;
|
uint32_t aut = 0;
|
||||||
|
uint32_t ssid;
|
||||||
|
|
||||||
if (argc) {
|
if (argc) {
|
||||||
if (argv[argc - 1]->f) {
|
if (argv[argc - 1]->f) {
|
||||||
|
|
@ -2229,9 +2230,14 @@ OSC::set_automation (const char *path, lo_arg **argv, int argc, lo_message msg)
|
||||||
if (!strncmp (path, "/strip/", 7)) {
|
if (!strncmp (path, "/strip/", 7)) {
|
||||||
// find ssid and stripable
|
// find ssid and stripable
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
strp = get_strip (argv[0]->i, get_address (msg));
|
if (types[1] == 'f') {
|
||||||
|
ssid = (uint32_t)argv[0]->f;
|
||||||
|
} else {
|
||||||
|
ssid = argv[0]->i;
|
||||||
|
}
|
||||||
|
strp = get_strip (ssid, get_address (msg));
|
||||||
} else {
|
} else {
|
||||||
uint32_t ssid = atoi (&(strrchr (path, '/' ))[1]);
|
ssid = atoi (&(strrchr (path, '/' ))[1]);
|
||||||
strp = get_strip (ssid, get_address (msg));
|
strp = get_strip (ssid, get_address (msg));
|
||||||
}
|
}
|
||||||
ctr = 7;
|
ctr = 7;
|
||||||
|
|
@ -2287,7 +2293,7 @@ OSC::set_automation (const char *path, lo_arg **argv, int argc, lo_message msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
OSC::touch_detect (const char *path, lo_arg **argv, int argc, lo_message msg)
|
OSC::touch_detect (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg)
|
||||||
{
|
{
|
||||||
if (!session) return -1;
|
if (!session) return -1;
|
||||||
|
|
||||||
|
|
@ -2296,6 +2302,7 @@ OSC::touch_detect (const char *path, lo_arg **argv, int argc, lo_message msg)
|
||||||
boost::shared_ptr<Stripable> strp = boost::shared_ptr<Stripable>();
|
boost::shared_ptr<Stripable> strp = boost::shared_ptr<Stripable>();
|
||||||
uint32_t ctr = 0;
|
uint32_t ctr = 0;
|
||||||
uint32_t touch = 0;
|
uint32_t touch = 0;
|
||||||
|
uint32_t ssid;
|
||||||
|
|
||||||
if (argc) {
|
if (argc) {
|
||||||
if (argv[argc - 1]->f) {
|
if (argv[argc - 1]->f) {
|
||||||
|
|
@ -2309,9 +2316,14 @@ OSC::touch_detect (const char *path, lo_arg **argv, int argc, lo_message msg)
|
||||||
if (!strncmp (path, "/strip/", 7)) {
|
if (!strncmp (path, "/strip/", 7)) {
|
||||||
// find ssid and stripable
|
// find ssid and stripable
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
strp = get_strip (argv[0]->i, get_address (msg));
|
if (types[1] == 'f') {
|
||||||
|
ssid = (uint32_t)argv[0]->f;
|
||||||
|
} else {
|
||||||
|
ssid = argv[0]->i;
|
||||||
|
}
|
||||||
|
strp = get_strip (ssid, get_address (msg));
|
||||||
} else {
|
} else {
|
||||||
uint32_t ssid = atoi (&(strrchr (path, '/' ))[1]);
|
ssid = atoi (&(strrchr (path, '/' ))[1]);
|
||||||
strp = get_strip (ssid, get_address (msg));
|
strp = get_strip (ssid, get_address (msg));
|
||||||
}
|
}
|
||||||
ctr = 7;
|
ctr = 7;
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,10 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||||
JogMode jogmode; // current jogmode
|
JogMode jogmode; // current jogmode
|
||||||
uint32_t bank; // current bank
|
uint32_t bank; // current bank
|
||||||
uint32_t bank_size; // size of banks for this surface
|
uint32_t bank_size; // size of banks for this surface
|
||||||
|
uint32_t plug_page; // current plugin page
|
||||||
|
uint32_t plug_page_size; // plugin page size (number of controls)
|
||||||
|
uint32_t send_page; // current send page
|
||||||
|
uint32_t send_page_size; // send page size in channels
|
||||||
std::bitset<32> strip_types;// what strip types are a part of this bank
|
std::bitset<32> strip_types;// what strip types are a part of this bank
|
||||||
uint32_t nstrips; // how many strips are there for strip_types
|
uint32_t nstrips; // how many strips are there for strip_types
|
||||||
std::bitset<32> feedback; // What is fed back? strips/meters/timecode/bar_beat/global
|
std::bitset<32> feedback; // What is fed back? strips/meters/timecode/bar_beat/global
|
||||||
|
|
@ -232,8 +236,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||||
int catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data);
|
int catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data);
|
||||||
static int _catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data);
|
static int _catchall (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data);
|
||||||
|
|
||||||
int set_automation (const char *path, lo_arg **argv, int argc, lo_message msg);
|
int set_automation (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg);
|
||||||
int touch_detect (const char *path, lo_arg **argv, int argc, lo_message msg);
|
int touch_detect (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg);
|
||||||
int fake_touch (boost::shared_ptr<ARDOUR::AutomationControl> ctrl);
|
int fake_touch (boost::shared_ptr<ARDOUR::AutomationControl> ctrl);
|
||||||
|
|
||||||
int route_get_sends (lo_message msg);
|
int route_get_sends (lo_message msg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue