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.
This commit is contained in:
@@ -435,7 +435,7 @@ impl FlacCacheSink {
|
|||||||
encoder_options: EncoderOptions,
|
encoder_options: EncoderOptions,
|
||||||
collection: Option<String>,
|
collection: Option<String>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let logic = FlacCacheSinkLogic::new(cache, covers, collection, encoder_options, 8);
|
let logic = FlacCacheSinkLogic::new(cache, covers, collection, encoder_options, 256);
|
||||||
Self {
|
Self {
|
||||||
inner: Node::new_with_input(logic, channel_size),
|
inner: Node::new_with_input(logic, channel_size),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user