diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-25 13:12:47 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-29 14:18:16 -0400 |
commit | a51dcaaa21bf1d2bcb81430e24140d24b9dd8b8a (patch) | |
tree | 72b8cb1ba6429d8902dba55a958c05477ce27194 /libs/ardour/session_transport.cc | |
parent | 5c8e239f95138d2a0fa989da7ccbf77a7716fdf4 (diff) |
implement Ardour-only version of playhead priority, which is basically auto-return to last roll location or nothing
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r-- | libs/ardour/session_transport.cc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 80bfb10998..51734a06c0 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -494,6 +494,7 @@ Session::non_realtime_locate () clear_clicks (); } +#ifdef USE_TRACKS_CODE_FEATURES bool Session::select_playhead_priority_target (framepos_t& jump_to) { @@ -525,15 +526,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to) 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 { @@ -570,14 +563,26 @@ 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; } +#else + +bool +Session::select_playhead_priority_target (framepos_t& jump_to) +{ + if (!config.get_auto_return()) { + return false; + } + + jump_to = _last_roll_location; + return jump_to >= 0; +} + +#endif void Session::follow_playhead_priority () |