From 2e793141e5434043205763c70d3a597cf2d78eeb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Jan 2025 17:51:59 +0100 Subject: Separate clocks --- PCM.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'PCM.cpp') diff --git a/PCM.cpp b/PCM.cpp index e6d915f..218ba59 100644 --- a/PCM.cpp +++ b/PCM.cpp @@ -59,13 +59,13 @@ PCM::~PCM() free(pfd); } -void PCM::click() +void PCM::click(int64_t offset_us) { snd_pcm_sframes_t delay; if (0 > snd_pcm_delay(handle, &delay)) { } - m_phase = - click_latency_frames + delay; + m_phase = - click_latency_frames + delay + offset_us; } // generate 1 buffer size -- cgit v1.2.3