From c04674683243b987de4a6da6760efd7416c5b224 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:19:32 +0100 Subject: [PATCH] Make the pipewire latency 200000 (uS?) instead of 20000. --- audio_pw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio_pw.c b/audio_pw.c index 4271ba09..ee28fa51 100644 --- a/audio_pw.c +++ b/audio_pw.c @@ -359,11 +359,11 @@ static void start(int sample_rate, int sample_format) { data.rate = sample_rate; data.channels = 2; data.stride = spa_format_samplesize(data.format) * data.channels; - data.latency = 20000; + data.latency = 20000; // looks like microseconds nom = nearbyint((data.latency * data.rate) / 1000000.0); - pw_properties_setf(data.props, PW_KEY_NODE_LATENCY, "%u/%u", nom, data.rate); + pw_properties_setf(data.props, PW_KEY_NODE_LATENCY, "%u/%u", nom, data.rate); // looks like samples in the data.latency period debug(1, "pw: rate: %d", data.rate); debug(1, "pw: channgels: %d", data.channels);