From 25eb705f59208a610c95afa7c56645c8dbf7ad9c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 8 Nov 2025 20:02:04 +0000 Subject: [PATCH] Increase PCM buffer capacity from 8 to 256 to prevent encoding glitches The small buffer (8) was causing the pump to block frequently when the FLAC encoder was slow to consume data. This created micro-pauses in the PCM stream that resulted in audible clicks in the encoded FLAC files. With a larger buffer (256), the pump can continue sending data without blocking, ensuring continuous audio flow to the encoder and eliminating the clicks. --- pmoaudio-ext/src/sinks/flac_cache_sink.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmoaudio-ext/src/sinks/flac_cache_sink.rs b/pmoaudio-ext/src/sinks/flac_cache_sink.rs index 93a303c9..2e6d377c 100755 --- a/pmoaudio-ext/src/sinks/flac_cache_sink.rs +++ b/pmoaudio-ext/src/sinks/flac_cache_sink.rs @@ -435,7 +435,7 @@ impl FlacCacheSink { encoder_options: EncoderOptions, collection: Option, ) -> Self { - let logic = FlacCacheSinkLogic::new(cache, covers, collection, encoder_options, 8); + let logic = FlacCacheSinkLogic::new(cache, covers, collection, encoder_options, 256); Self { inner: Node::new_with_input(logic, channel_size), }