mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
add OSC trim control
This commit is contained in:
parent
5f7cee5bfe
commit
1e5be9ebfd
2 changed files with 21 additions and 1 deletions
|
|
@ -370,6 +370,8 @@ OSC::register_callbacks()
|
|||
REGISTER_CALLBACK (serv, "/ardour/routes/recenable", "ii", route_recenable);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/gainabs", "if", route_set_gain_abs);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/gaindB", "if", route_set_gain_dB);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/trimabs", "if", route_set_trim_abs);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/trimdB", "if", route_set_trim_dB);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/pan_stereo_position", "if", route_set_pan_stereo_position);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/pan_stereo_width", "if", route_set_pan_stereo_width);
|
||||
REGISTER_CALLBACK (serv, "/ardour/routes/plugin/parameter", "iiif", route_plugin_parameter);
|
||||
|
|
@ -861,18 +863,32 @@ OSC::route_set_gain_abs (int rid, float level)
|
|||
|
||||
int
|
||||
OSC::route_set_gain_dB (int rid, float dB)
|
||||
{
|
||||
return route_set_gain_abs (rid, dB_to_coefficient (dB));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
OSC::route_set_trim_abs (int rid, float level)
|
||||
{
|
||||
if (!session) return -1;
|
||||
|
||||
boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
|
||||
|
||||
if (r) {
|
||||
r->set_gain (dB_to_coefficient (dB), this);
|
||||
r->set_trim (level, this);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
OSC::route_set_trim_dB (int rid, float dB)
|
||||
{
|
||||
return route_set_trim_abs(rid, dB_to_coefficient (dB));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
OSC::route_set_pan_stereo_position (int rid, float pos)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue