hotfix process-graph: include internal-send -> internal return
[ardour.git] / libs / ardour / session_transport.cc
index e2d64dd2edd877e4983f9cfb55bfdda1b2c6ab78..f1486ada78144abc89636c940f4d92d9f0b4a5e0 100644 (file)
@@ -109,7 +109,7 @@ void
 Session::request_transport_speed (double speed, bool as_default)
 {
        SessionEvent* ev = new SessionEvent (SessionEvent::SetTransportSpeed, SessionEvent::Add, SessionEvent::Immediate, 0, speed);
-       ev->third_yes_or_no = true; // as_default
+       ev->third_yes_or_no = as_default; // as_default
        DEBUG_TRACE (DEBUG::Transport, string_compose ("Request transport speed = %1 as default = %2\n", speed, as_default));
        queue_event (ev);
 }
@@ -163,6 +163,12 @@ Session::force_locate (framepos_t target_frame, bool with_roll)
 void
 Session::request_play_loop (bool yn, bool change_transport_roll)
 {
+       if (_slave && yn) {
+               // don't attempt to loop when not using Internal Transport
+               // see also gtk2_ardour/ardour_ui_options.cc parameter_changed()
+               return;
+       }
+
        SessionEvent* ev;
        Location *location = _locations->auto_loop_location();
        double target_speed;
@@ -618,7 +624,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
 bool
 Session::select_playhead_priority_target (framepos_t& jump_to)
 {
-       if (!config.get_auto_return()) {
+       if (config.get_external_sync() || !config.get_auto_return()) {
                return false;
        }
 
@@ -1342,7 +1348,9 @@ Session::set_transport_speed (double speed, framepos_t destination_frame, bool a
                }
 
        } else if (transport_stopped() && speed == 1.0) {
-
+               if (as_default) {
+                       _default_transport_speed = speed;
+               }
                /* we are stopped and we want to start rolling at speed 1 */
 
                if (Config->get_loop_is_mode() && play_loop) {