summaryrefslogtreecommitdiffhomepage
path: root/PCM.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-04 17:51:59 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-04 17:51:59 +0100
commit2e793141e5434043205763c70d3a597cf2d78eeb (patch)
tree8b6a14273fcc98ff7bf118cf63574257a637547f /PCM.cpp
parent624a69994d89c71b1ce59dd3b2117a235400be2f (diff)
Separate clocks
Diffstat (limited to 'PCM.cpp')
-rw-r--r--PCM.cpp4
1 files changed, 2 insertions, 2 deletions
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