summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-08-10 10:29:16 +0200
committerMax Kellermann <max@musicpd.org>2021-08-10 10:43:56 +0200
commit668c3782b22c712ecc7eff30c056eb89eac64479 (patch)
tree173e2726e4449cfd8eeca5cf8bc491f14e8ed3f5
parent1e0af2dadf5e2c25c5f8fbaca0493fdfec131086 (diff)
output/pipewire: smaller ring buffer, 500ms should be enough
-rw-r--r--src/output/plugins/PipeWireOutputPlugin.cxx4
1 files 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];