diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-15 15:50:05 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-15 16:06:04 -0700 |
commit | 8f71b6430b699bd04f9c7a4a3eac2ded3fd8deff (patch) | |
tree | c070950aff00dc3e0af63dc05a6e79c50af46891 /libs/ardour/session_transport.cc | |
parent | df4a30b1a0bd83ba1962b09d8108c39344e36e60 (diff) |
when synced to JACK transport, transport requests go there first.
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r-- | libs/ardour/session_transport.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 80dedcd129..7d2401311f 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -45,6 +45,7 @@ #include "midi++/mmc.h" #include "midi++/port.h" +#include "ardour/audio_backend.h" #include "ardour/audioengine.h" #include "ardour/auditioner.h" #include "ardour/automation_watch.h" @@ -913,9 +914,19 @@ Session::request_sync_source (boost::shared_ptr<TransportMaster> tm) void Session::request_transport_speed (double speed, bool as_default, TransportRequestSource origin) { + if (synced_to_engine()) { + if (speed != 0) { + _engine.transport_start (); + } else { + _engine.transport_stop (); + } + return; + } + if (should_ignore_transport_request (origin, TR_Speed)) { return; } + SessionEvent* ev = new SessionEvent (SessionEvent::SetTransportSpeed, SessionEvent::Add, SessionEvent::Immediate, 0, speed); 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)); @@ -943,6 +954,11 @@ Session::request_transport_speed_nonzero (double speed, bool as_default, Transpo void Session::request_stop (bool abort, bool clear_state, TransportRequestSource origin) { + if (synced_to_engine()) { + _engine.transport_stop (); + return; + } + if (should_ignore_transport_request (origin, TR_Stop)) { return; } @@ -955,6 +971,11 @@ Session::request_stop (bool abort, bool clear_state, TransportRequestSource orig void Session::request_locate (samplepos_t target_sample, bool with_roll, TransportRequestSource origin) { + if (synced_to_engine()) { + _engine.transport_locate (target_sample); + return; + } + if (should_ignore_transport_request (origin, TR_Locate)) { return; } |