From ba1a60873ab64de0b066e1671dc114d06e5377a1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 May 2020 00:41:40 +0200 Subject: [PATCH] Fix MTC delta report This amends a6ffc6213b92735034bd7dc39638e926bca219da. apply the offset before the DLL. --- libs/ardour/mtc_slave.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 632a5f7e5f..c0578d0908 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -318,7 +318,7 @@ MTC_TransportMaster::update_mtc_qtr (Parser& p, int which_qtr, samplepos_t now) mtc_speed = (t1 - t0) / qtr_d; DEBUG_TRACE (DEBUG::MTC, string_compose ("qtr sample DLL t0:%1 t1:%2 err:%3 spd:%4 ddt:%5\n", t0, t1, e, mtc_speed, e2 - qtr_d)); - current.update (mtc_frame + mtc_slave_latency.max, now, mtc_speed); + current.update (mtc_frame, now, mtc_speed); last_inbound_frame = now; } @@ -502,9 +502,9 @@ MTC_TransportMaster::update_mtc_time (const MIDI::byte *msg, bool was_full, samp if (first_mtc_timestamp == 0 || current.timestamp == 0) { first_mtc_timestamp = now; init_mtc_dll(mtc_frame, qtr); - mtc_frame_dll = mtc_frame; + mtc_frame_dll = mtc_frame + mtc_slave_latency.max; } - current.update (mtc_frame, now, current.speed); + current.update (mtc_frame + mtc_slave_latency.max, now, current.speed); reset_window (mtc_frame); } }