Allow strips to add or remove personal sends
[ardour.git] / gtk2_ardour / route_ui.cc
index 6eca450f17bff5296794303b3459985723e76538..b9ece1ed075340a57381854de54e4976696dfa5e 100644 (file)
@@ -499,7 +499,7 @@ RouteUI::mute_press (GdkEventButton* ev)
                                        }
 
                                        boost::shared_ptr<MuteControl> mc = _route->mute_control();
-                                       mc->start_touch (_session->audible_frame ());
+                                       mc->start_touch (_session->audible_sample ());
                                        _session->set_controls (route_list_to_control_list (rl, &Stripable::mute_control), _route->muted_by_self() ? 0.0 : 1.0, Controllable::InverseGroup);
                                }
 
@@ -515,7 +515,7 @@ RouteUI::mute_press (GdkEventButton* ev)
                                }
 
                                boost::shared_ptr<MuteControl> mc = _route->mute_control();
-                               mc->start_touch (_session->audible_frame ());
+                               mc->start_touch (_session->audible_sample ());
                                mc->set_value (!_route->muted_by_self(), Controllable::UseGroup);
                        }
                }
@@ -533,7 +533,7 @@ RouteUI::mute_release (GdkEventButton* /*ev*/)
                _mute_release = 0;
        }
 
-       _route->mute_control()->stop_touch (_session->audible_frame ());
+       _route->mute_control()->stop_touch (_session->audible_sample ());
 
        return false;
 }
@@ -906,17 +906,10 @@ RouteUI::monitor_release (GdkEventButton* ev, MonitorChoice monitor_choice)
        MonitorChoice mc;
        boost::shared_ptr<RouteList> rl;
 
-       /* XXX for now, monitoring choices are orthogonal. cue monitoring
-          will follow in 3.X but requires mixing the input and playback (disk)
-          signal together, which requires yet more buffers.
-       */
-
        if (t->monitoring_control()->monitoring_choice() & monitor_choice) {
                mc = MonitorChoice (t->monitoring_control()->monitoring_choice() & ~monitor_choice);
        } else {
-               /* this line will change when the options are non-orthogonal */
-               // mc = MonitorChoice (t->monitoring_choice() | monitor_choice);
-               mc = monitor_choice;
+               mc = MonitorChoice (t->monitoring_control()->monitoring_choice() | monitor_choice);
        }
 
        if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
@@ -1927,7 +1920,7 @@ RouteUI::map_frozen ()
 void
 RouteUI::adjust_latency ()
 {
-       LatencyDialog dialog (_route->name() + _(" latency"), *(_route->output()), _session->frame_rate(), AudioEngine::instance()->samples_per_cycle());
+       LatencyDialog dialog (_route->name() + _(" latency"), *(_route->output()), _session->sample_rate(), AudioEngine::instance()->samples_per_cycle());
 }
 
 
@@ -2433,3 +2426,11 @@ RouteUI::stripable () const
 {
        return _route;
 }
+
+void
+RouteUI::set_disk_io_point (DiskIOPoint diop)
+{
+       if (_route && is_track()) {
+               track()->set_disk_io_point (diop);
+       }
+}