diff options
author | Robin Gareus <robin@gareus.org> | 2012-10-22 17:34:15 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-10-22 17:34:15 +0000 |
commit | 948fd683cdb2e6fca0c096e2941f28e4bc82a496 (patch) | |
tree | 0aa836987ca04c48e5de275c0665fe67dd5fc593 /libs/ardour/mtc_slave.cc | |
parent | a64a79b72c68365528839e9adc3d1131414f7775 (diff) |
MTC slave - fix jumps on initialization
Do not re-position transport before first full frame has arrived.
git-svn-id: svn://localhost/ardour2/branches/3.0@13317 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/mtc_slave.cc')
-rw-r--r-- | libs/ardour/mtc_slave.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 8baddc3efc..305b12186f 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -243,6 +243,7 @@ MTC_Slave::update_mtc_qtr (Parser& /*p*/, int which_qtr, framepos_t now) mtc_frame += qtr * transport_direction; DEBUG_TRACE (DEBUG::MTC, string_compose ("qtr frame %1 at %2 -> mtc_frame: %3\n", which_qtr, now, mtc_frame)); + framepos_t ts = 0; double mtc_speed = 0; if (first_mtc_timestamp != 0) { @@ -253,12 +254,13 @@ MTC_Slave::update_mtc_qtr (Parser& /*p*/, int which_qtr, framepos_t now) e2 += c * e; mtc_speed = (t1 - t0) / qtr_d; + ts = now; DEBUG_TRACE (DEBUG::MTC, string_compose ("qtr frame DLL t0:%1 t1:%2 err:%3 spd:%4 ddt:%5\n", t0, t1, e, mtc_speed, e2 - qtr_d)); } current.guard1++; current.position = mtc_frame; - current.timestamp = now; + current.timestamp = ts; current.speed = mtc_speed; current.guard2++; |