diff options
author | Len Ovens <len@ovenwerks.net> | 2017-08-02 10:43:13 -0700 |
---|---|---|
committer | Len Ovens <len@ovenwerks.net> | 2017-08-02 10:43:13 -0700 |
commit | d1558dcab5bcf0a9f81ab743a17409782e913dc7 (patch) | |
tree | 0e8b28ecb9dc496e4944d1d1f2d7b81300b3371b | |
parent | 1a288ddd952752e9fdf528eb5d135f0af7dd6f73 (diff) |
OSC: Add command to select Master
-rw-r--r-- | libs/surfaces/osc/osc.cc | 17 | ||||
-rw-r--r-- | libs/surfaces/osc/osc.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 46446f357e..4aa27018fb 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -543,6 +543,7 @@ OSC::register_callbacks() REGISTER_CALLBACK (serv, "/master/mute", "i", master_set_mute); REGISTER_CALLBACK (serv, "/master/trimdB", "f", master_set_trim); REGISTER_CALLBACK (serv, "/master/pan_stereo_position", "f", master_set_pan_stereo_position); + REGISTER_CALLBACK (serv, "/master/select", "f", master_select); REGISTER_CALLBACK (serv, "/monitor/gain", "f", monitor_set_gain); REGISTER_CALLBACK (serv, "/monitor/fader", "f", monitor_set_fader); REGISTER_CALLBACK (serv, "/monitor/db_delta", "f", monitor_delta_gain); @@ -2485,6 +2486,22 @@ OSC::master_set_mute (uint32_t state) } int +OSC::master_select (lo_message msg) +{ + if (!session) { + return -1; + } + OSCSurface *sur = get_surface(get_address (msg)); + sur->expand_enable = false; + boost::shared_ptr<Stripable> s = session->master_out(); + if (s) { + SetStripableSelection (s); + } + + return 0; +} + +int OSC::monitor_set_gain (float dB) { if (!session) return -1; diff --git a/libs/surfaces/osc/osc.h b/libs/surfaces/osc/osc.h index 20a7b96632..79392a0008 100644 --- a/libs/surfaces/osc/osc.h +++ b/libs/surfaces/osc/osc.h @@ -306,6 +306,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest> PATH_CALLBACK_MSG(refresh_surface); PATH_CALLBACK_MSG(bank_up); PATH_CALLBACK_MSG(bank_down); + PATH_CALLBACK_MSG(master_select); #define PATH_CALLBACK(name) \ static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \ @@ -622,6 +623,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest> int master_set_trim (float dB); int master_set_pan_stereo_position (float position, lo_message msg); int master_set_mute (uint32_t state); + int master_select (lo_message msg); int monitor_set_gain (float dB); int monitor_set_fader (float position); int monitor_delta_gain (float delta); |