OSC API update for surfaces that always send float parameters.
This commit is contained in:
parent
d1cfd95591
commit
b456060388
|
@ -362,37 +362,32 @@ OSC::register_callbacks()
|
|||
REGISTER_CALLBACK (serv, "/ardour/toggle_all_rec_enables", "", toggle_all_rec_enables);
|
||||
|
||||
/*
|
||||
* NOTE: these messages are provided for (arguably broken) apps
|
||||
* NOTE: these messages are provided for (arguably broken) apps
|
||||
* that MUST send float args ( TouchOSC and Lemur ).
|
||||
* Normally these ardour transport messages don't require an argument,
|
||||
* so we're providing redundant calls with vestigial "float" args.
|
||||
*
|
||||
* Is it really useful to ignore the parameter?
|
||||
* http://hexler.net/docs/touchosc-controls-reference suggests that
|
||||
* push buttons do send 0,1. We will have to provide semantic equivalents
|
||||
* rather than simply ignore the parameter.
|
||||
* e.g push & release the button will send
|
||||
* .../undo f 1
|
||||
* .../undo f 0
|
||||
* resulting in two undos.
|
||||
* These controls are active on 1.0 only (to prevent duplicate action on
|
||||
* press "/button 1", and release "/button 0")
|
||||
* http://hexler.net/docs/touchosc-controls-reference
|
||||
*/
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/loop_toggle", "f", loop_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/add_marker", "f", add_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/goto_start", "f", goto_start);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/goto_end", "f", goto_end);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/rewind", "f", rewind);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/ffwd", "f", ffwd);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/transport_stop", "f", transport_stop);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/transport_play", "f", transport_play);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/save_state", "f", save_state);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/prev_marker", "f", prev_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/next_marker", "f", next_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/undo", "f", undo);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/redo", "f", redo);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/toggle_punch_in", "f", toggle_punch_in);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/toggle_punch_out", "f", toggle_punch_out);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/rec_enable_toggle", "f", rec_enable_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/unused_argument/toggle_all_rec_enables", "f", toggle_all_rec_enables);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/loop_toggle", "f", loop_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/add_marker", "f", add_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/goto_start", "f", goto_start);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/goto_end", "f", goto_end);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/rewind", "f", rewind);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/ffwd", "f", ffwd);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/transport_stop", "f", transport_stop);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/transport_play", "f", transport_play);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/save_state", "f", save_state);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/prev_marker", "f", prev_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/next_marker", "f", next_marker);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/undo", "f", undo);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/redo", "f", redo);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_punch_in", "f", toggle_punch_in);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_punch_out", "f", toggle_punch_out);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/rec_enable_toggle", "f", rec_enable_toggle);
|
||||
REGISTER_CALLBACK (serv, "/ardour/pushbutton/toggle_all_rec_enables", "f", toggle_all_rec_enables);
|
||||
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/mute", "ii", route_mute);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/solo", "ii", route_solo);
|
||||
|
|
|
@ -145,7 +145,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
|||
static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
|
||||
return static_cast<OSC*>(user_data)->cb_ ## name (path, types, argv, argc, data); \
|
||||
} \
|
||||
int cb_ ## name (const char *, const char *, lo_arg **, int, void *) { \
|
||||
int cb_ ## name (const char *, const char *types, lo_arg ** argv, int argc, void *) { \
|
||||
if (argc > 0 && !strcmp (types, "f") && argv[0]->f != 1.0) { return 0; } \
|
||||
name (); \
|
||||
return 0; \
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user