summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-08 03:40:15 +0000
committerDavid Robillard <d@drobilla.net>2012-07-08 03:40:15 +0000
commite2c26e1b99ac073180eb22b8c06cafaa658cbda8 (patch)
treed5f64bcf51f1f4da2c3ea0b5024b3042ad713482 /libs
parent39b42e376611cfe42e230640a404dce26266e8c9 (diff)
Report correct time instead of old time when locating as Jack transport master.
I encountered this today writing a transport slave, but it seems to be the same problem as issue #743 from 8 years ago. The issue is easier to see with a transport slave client that prints any transport change whatsoever, for example if the current location is some point well into the session and rewind to start is pressed, Ardour reports the old position, not zero. With this change, it reports zero as expected. See comment about why this was happening. If locating here is evil for some reason, then some other way of making jack_timebase_callback report the target position is required. Contrary to what the old comment below this change suggests, follow_slave() does not update _transport_frame in time. git-svn-id: svn://localhost/ardour2/branches/3.0@12993 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_transport.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 205c682b6f..a878b9fabc 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -798,6 +798,14 @@ Session::start_locate (framepos_t target_frame, bool with_roll, bool with_flush,
if (target_frame != pos) {
+ if (config.get_jack_time_master()) {
+ /* actually locate now, since otherwise jack_timebase_callback
+ will use the incorrect _transport_frame and report an old
+ and incorrect time to Jack transport
+ */
+ locate (target_frame, with_roll, with_flush, with_loop, force);
+ }
+
/* tell JACK to change transport position, and we will
follow along later in ::follow_slave()
*/