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
This commit is contained in:
@@ -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()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user