From aeed50b1ccd91a0669f5c2359f7131555ece1e40 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 15 Apr 2021 23:09:00 -0600 Subject: [PATCH] add Session::reset_transport_speed() --- libs/ardour/ardour/session.h | 4 +++- libs/ardour/session_transport.cc | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index a625659ee0..2d0b9728f4 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -477,6 +477,8 @@ public: void goto_start (bool and_roll = false); void use_rf_shuttle_speed (); void allow_auto_play (bool yn); + + void reset_transport_speed (TransportRequestSource origin = TRS_UI); void request_transport_speed (double speed, bool as_default = true, TransportRequestSource origin = TRS_UI); void request_transport_speed_nonzero (double, bool as_default = true, TransportRequestSource origin = TRS_UI); void request_overwrite_buffer (boost::shared_ptr, OverwriteReason); @@ -1343,7 +1345,7 @@ protected: bool should_roll_after_locate () const; double speed() const { return _transport_speed; } samplepos_t position() const { return _transport_sample; } - void set_transport_speed (double speed, bool abort, bool clear_state, bool as_default); + void set_transport_speed (double speed, bool as_default); bool need_declick_before_locate () const; private: diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index d9a375c2d2..f15e53cd6c 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -856,6 +856,12 @@ Session::request_sync_source (boost::shared_ptr tm) queue_event (ev); } +void +Session::reset_transport_speed (TransportRequestSource origin) +{ + request_transport_speed (1.0, true, origin); +} + void Session::request_transport_speed (double speed, bool as_default, TransportRequestSource origin) {