From 650b4a6900442cae203e901918fbdc3f221da7c3 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 22 Sep 2020 21:15:31 +0200 Subject: [PATCH] Only query MIDI Clock port latency when it changes Previously there were excessive calls, since MidiClockTicker::reset() is called in **every** cycle when Mclk is disabled. --- libs/ardour/ticker.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc index 1d0042c5de..def3b53902 100644 --- a/libs/ardour/ticker.cc +++ b/libs/ardour/ticker.cc @@ -45,6 +45,7 @@ MidiClockTicker::MidiClockTicker (Session* s) _session = s; _midi_port = s->midi_clock_output_port (); reset (); + resync_latency (true); s->LatencyUpdated.connect_same_thread (_latency_connection, boost::bind (&MidiClockTicker::resync_latency, this, _1)); } @@ -60,8 +61,6 @@ MidiClockTicker::reset () _beat_pos = 0; _clock_cnt = 0; _transport_pos = -1; - - resync_latency (true); } void