act = global_actions.register_action (transport_actions, X_("PlaySelection"), _("Play Selection"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
- act = global_actions.register_action (transport_actions, X_("PlayPreroll"), _("Play Selection w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
+ act = global_actions.register_action (transport_actions, X_("PlayPreroll"), _("Play w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
void
Editor::play_with_preroll ()
{
- {
- framepos_t preroll = get_preroll();
-
- framepos_t start, end;
- if (!get_selection_extents ( start, end))
- return;
+ framepos_t preroll = get_preroll();
+ framepos_t start, end;
+ if ( UIConfiguration::instance().get_follow_edits() && get_selection_extents ( start, end) ) {
+ framepos_t ret = start;
+
if (start > preroll)
start = start - preroll;
lar.push_back (ar);
_session->request_play_range (&lar, true);
+ _session->set_requested_return_frame( ret ); //force auto-return to return to range start, without the preroll
+ } else {
+ framepos_t ph = playhead_cursor->current_frame ();
+ framepos_t start;
+ if (ph > preroll)
+ start = ph - preroll;
+ else
+ start = 0;
+ _session->request_locate ( start, true);
+ _session->set_requested_return_frame( ph ); //force auto-return to return to playhead location, without the preroll
}
}