From 668c3782b22c712ecc7eff30c056eb89eac64479 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Aug 2021 10:29:16 +0200 Subject: [PATCH] output/pipewire: smaller ring buffer, 500ms should be enough --- src/output/plugins/PipeWireOutputPlugin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index b83bb7399..fbc8208b9 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -363,9 +363,9 @@ PipeWireOutput::Open(AudioFormat &audio_format) sample_format = audio_format.format; interrupted = false; - /* allocate a ring buffer of 1 second */ + /* allocate a ring buffer of 0.5 seconds */ const std::size_t ring_buffer_size = - frame_size * audio_format.sample_rate; + frame_size * (audio_format.sample_rate / 2); ring_buffer = new RingBuffer(ring_buffer_size); const struct spa_pod *params[1];