+int
+OSC::route_set_send_gain_abs (int rid, int sid, float val)
+{
+ if (!session) {
+ return -1;
+ }
+
+ boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
+
+ if (!r) {
+ return -1;
+ }
+
+ /* revert to zero-based counting */
+
+ if (sid > 0) {
+ --sid;
+ }
+
+ boost::shared_ptr<Processor> p = r->nth_send (send);
+
+ if (p) {
+ boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p);
+ boost::shared_ptr<Amp> a = s->amp();
+
+ if (a) {
+ a->set_gain (val, this);
+ }
+ }
+}
+
+int
+OSC::route_set_send_gain_dB (int rid, int sid, float val)
+{
+ if (!session) {
+ return -1;
+ }
+
+ boost::shared_ptr<Route> r = session->route_by_remote_id (rid);
+
+ if (!r) {
+ return -1;
+ }
+
+ /* revert to zero-based counting */
+
+ if (sid > 0) {
+ --sid;
+ }
+
+ boost::shared_ptr<Processor> p = r->nth_send (send);
+
+ if (p) {
+ boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p);
+ boost::shared_ptr<Amp> a = s->amp();
+
+ if (a) {
+ a->set_gain (dB_to_coefficient (val), this);
+ }
+ }
+}
+