diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 1defe3d54a..343e549ff4 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -163,7 +163,11 @@ CONFIG_VARIABLE (ShuttleUnits, shuttle_units, "shuttle-units", Percentage) CONFIG_VARIABLE (float, shuttle_max_speed, "shuttle-max-speed", 8.0f) CONFIG_VARIABLE (bool, locate_while_waiting_for_sync, "locate-while-waiting-for-sync", false) CONFIG_VARIABLE (bool, disable_disarm_during_roll, "disable-disarm-during-roll", false) +#ifdef USE_TRACKS_CODE_FEATURES +CONFIG_VARIABLE (AutoReturnTarget, auto_return_target_list, "auto-return-target-list", AutoReturnTarget(LastLocate) ) +#else CONFIG_VARIABLE (AutoReturnTarget, auto_return_target_list, "auto-return-target-list", AutoReturnTarget(LastLocate|RangeSelectionStart|Loop|RegionSelectionStart)) +#endif /* metering */ diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 994a4b89a1..f17e3b9c8a 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -505,17 +505,47 @@ Session::select_playhead_priority_target (framepos_t& jump_to) return false; } + if (Profile->get_trx() && transport_rolling() ) { + // We're playing, so do nothing. + // Next stop will put us where we need to be. + return false; + } + /* Note that the order of checking each AutoReturnTarget flag defines the priority each flag. + + Ardour/Mixbus: Last Locate + Range Selection + Loop Range + Region Selection + + Tracks: Range Selection + Loop Range + Region Selection + Last Locate */ +#ifndef USE_TRACKS_CODE_FEATURES if (autoreturn & LastLocate) { jump_to = _last_roll_location; } if (jump_to < 0 && (autoreturn & RangeSelectionStart)) { +#else + if (autoreturn & RangeSelectionStart) { +#endif if (!_range_selection.empty()) { jump_to = _range_selection.from; + } else { + if (Profile->get_trx()) { + if (transport_rolling ()) { + /* Range selection no longer exists, but we're playing, + so do nothing. Next stop will put us where + we need to be. + */ + return false; + } + } } } @@ -527,6 +557,11 @@ Session::select_playhead_priority_target (framepos_t& jump_to) if (location) { jump_to = location->start(); + + if (Config->get_seamless_loop()) { + /* need to get track buffers reloaded */ + set_track_loop (true); + } } } } @@ -537,6 +572,12 @@ Session::select_playhead_priority_target (framepos_t& jump_to) } } +#ifdef USE_TRACKS_CODE_FEATURES + if (jump_to < 0 && (autoreturn & LastLocate)) { + jump_to = _last_roll_location; + } +#endif + return jump_to >= 0; }