OSC: Make pan controls work properly with MB too.
This commit is contained in:
parent
c21ba6f457
commit
80bd3e7279
@ -1631,8 +1631,8 @@ OSC::master_set_pan_stereo_position (float position, lo_message msg)
|
||||
|
||||
if (s) {
|
||||
if (s->pan_azimuth_control()) {
|
||||
s->pan_azimuth_control()->set_value (position, PBD::Controllable::NoGroup);
|
||||
endposition = s->pan_azimuth_control()->get_value ();
|
||||
s->pan_azimuth_control()->set_value (s->pan_azimuth_control()->interface_to_internal (position), PBD::Controllable::NoGroup);
|
||||
endposition = s->pan_azimuth_control()->internal_to_interface (s->pan_azimuth_control()->get_value ());
|
||||
}
|
||||
}
|
||||
OSCSurface *sur = get_surface(lo_message_get_source (msg));
|
||||
@ -2316,7 +2316,8 @@ OSC::sel_pan_position (float val, lo_message msg)
|
||||
}
|
||||
if (s) {
|
||||
if(s->pan_azimuth_control()) {
|
||||
s->pan_azimuth_control()->set_value (val, PBD::Controllable::NoGroup);
|
||||
s->pan_azimuth_control()->set_value (s->pan_azimuth_control()->interface_to_internal (val), PBD::Controllable::NoGroup);
|
||||
return sel_fail ("pan_stereo_position", s->pan_azimuth_control()->internal_to_interface (s->pan_azimuth_control()->get_value ()), lo_message_get_source (msg));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -2350,8 +2351,8 @@ OSC::route_set_pan_stereo_position (int ssid, float pos, lo_message msg)
|
||||
|
||||
if (s) {
|
||||
if(s->pan_azimuth_control()) {
|
||||
s->pan_azimuth_control()->set_value (pos, PBD::Controllable::NoGroup);
|
||||
return route_send_fail ("pan_stereo_position", ssid, s->pan_azimuth_control()->get_value (), lo_message_get_source (msg));
|
||||
s->pan_azimuth_control()->set_value (s->pan_azimuth_control()->interface_to_internal (pos), PBD::Controllable::NoGroup);
|
||||
return route_send_fail ("pan_stereo_position", ssid, s->pan_azimuth_control()->internal_to_interface (s->pan_azimuth_control()->get_value ()), lo_message_get_source (msg));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2659,7 +2660,7 @@ OSC::sel_pan_elevation (float val, lo_message msg)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return sel_fail ("pan_elevation_position", 0.5, lo_message_get_source (msg));
|
||||
return sel_fail ("pan_elevation_position", 0, lo_message_get_source (msg));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -248,7 +248,8 @@ OSCRouteObserver::send_change_message (string path, boost::shared_ptr<Controllab
|
||||
} else {
|
||||
lo_message_add_int32 (msg, ssid);
|
||||
}
|
||||
lo_message_add_float (msg, (float) controllable->get_value());
|
||||
float val = controllable->get_value();
|
||||
lo_message_add_float (msg, (float) controllable->internal_to_interface (val));
|
||||
|
||||
lo_send_message (addr, path.c_str(), msg);
|
||||
lo_message_free (msg);
|
||||
|
@ -216,7 +216,7 @@ OSCSelectObserver::~OSCSelectObserver ()
|
||||
clear_strip ("/select/meter", 0);
|
||||
}
|
||||
if (feedback[13]) { // Well known controls
|
||||
clear_strip ("/select/pan_elevation_position", .5);
|
||||
clear_strip ("/select/pan_elevation_position", 0);
|
||||
clear_strip ("/select/pan_frontback_position", .5);
|
||||
clear_strip ("/select/pan_lfe_control", 0);
|
||||
clear_strip ("/select/comp_enable", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user