REGISTER_CALLBACK (serv, "/select/fader", "f", sel_fader);
REGISTER_CALLBACK (serv, "/select/db_delta", "f", sel_dB_delta);
REGISTER_CALLBACK (serv, "/select/trimdB", "f", sel_trim);
+ REGISTER_CALLBACK (serv, "/select/hide", "i", sel_hide);
REGISTER_CALLBACK (serv, "/select/pan_stereo_position", "f", sel_pan_position);
REGISTER_CALLBACK (serv, "/select/pan_stereo_width", "f", sel_pan_width);
REGISTER_CALLBACK (serv, "/select/send_gain", "if", sel_sendgain);
REGISTER_CALLBACK (serv, "/strip/monitor_input", "ii", route_monitor_input);
REGISTER_CALLBACK (serv, "/strip/monitor_disk", "ii", route_monitor_disk);
REGISTER_CALLBACK (serv, "/strip/expand", "ii", strip_expand);
+ REGISTER_CALLBACK (serv, "/strip/hide", "ii", strip_hide);
REGISTER_CALLBACK (serv, "/strip/select", "ii", strip_gui_select);
REGISTER_CALLBACK (serv, "/strip/polarity", "ii", strip_phase);
REGISTER_CALLBACK (serv, "/strip/gain", "if", route_set_gain_dB);
int ssid = atoi (&path[14]);
ret = strip_expand (ssid, argv[0]->i, msg);
}
+ else if (!strncmp (path, "/strip/hide/", 12) && strlen (path) > 12) {
+ int ssid = atoi (&path[12]);
+ ret = strip_hide (ssid, argv[0]->i, msg);
+ }
else if (!strncmp (path, "/strip/select/", 14) && strlen (path) > 14) {
int ssid = atoi (&path[14]);
ret = strip_gui_select (ssid, argv[0]->i, msg);
void
OSC::global_feedback (OSCSurface* sur)
{
+ OSCGlobalObserver* o = sur->global_obs;
+ delete o;
if (sur->feedback[4] || sur->feedback[3] || sur->feedback[5] || sur->feedback[6]) {
// create a new Global Observer for this surface
return _strip_select (s, get_address (msg));
}
+int
+OSC::strip_hide (int ssid, int state, lo_message msg)
+{
+ boost::shared_ptr<Stripable> s = get_strip (ssid, get_address (msg));
+
+ if (s) {
+ if (state != s->is_hidden ()) {
+ s->presentation_info().set_hidden ((bool) state);
+ }
+ }
+ return 0;
+}
+
int
OSC::_strip_select (boost::shared_ptr<Stripable> s, lo_address addr)
{
OSCSelectObserver* so = dynamic_cast<OSCSelectObserver*>(sur->sel_obs);
if (sur->feedback[13]) {
if (so != 0) {
- so->refresh_strip (s, nsends, true);
+ so->refresh_strip (s, nsends, sur->gainmode, true);
} else {
OSCSelectObserver* sel_fb = new OSCSelectObserver (*this, sur);
sur->sel_obs = sel_fb;
return float_message("/select/trimdB", 0, get_address (msg));
}
+int
+OSC::sel_hide (uint32_t state, lo_message msg)
+{
+ 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) {
+ if (state != s->is_hidden ()) {
+ s->presentation_info().set_hidden ((bool) state);
+ }
+ }
+ return 0;
+}
+
int
OSC::sel_pan_position (float val, lo_message msg)
{
return -1;
}
OSCSurface *sur = get_surface(get_address (msg));
- boost::shared_ptr<Stripable> s = sur->select;
+ if (sur->plugins.size() > 0) {
+ boost::shared_ptr<Stripable> s = sur->select;
- boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (s);
+ boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (s);
- if (r) {
- boost::shared_ptr<Processor> redi=r->nth_plugin (sur->plugins[sur->plugin_id -1]);
- if (redi) {
- boost::shared_ptr<PluginInsert> pi;
- if ((pi = boost::dynamic_pointer_cast<PluginInsert>(redi))) {
- if(state > 0) {
- pi->activate();
- } else {
- pi->deactivate();
+ if (r) {
+ boost::shared_ptr<Processor> redi=r->nth_plugin (sur->plugins[sur->plugin_id -1]);
+ if (redi) {
+ boost::shared_ptr<PluginInsert> pi;
+ if ((pi = boost::dynamic_pointer_cast<PluginInsert>(redi))) {
+ if(state > 0) {
+ pi->activate();
+ } else {
+ pi->deactivate();
+ }
+ return 0;
}
- return 0;
}
}
}