fix: revert BufferSize::Fixed for PipeWire, use BufferSize::Default

PipeWire manages its own buffer scheduling via quantum. Forcing a fixed
buffer size (sample_rate / 10 = 19200 frames at 192kHz) conflicts with
PipeWire's internal scheduling and causes buffer underruns that produce
audible noise.

BufferSize::Fixed is kept only for:
- Exclusive mode (512 frames, low latency)
- ALSA backend (direct ALSA, not through PipeWire)
This commit is contained in:
vicrodh committed 2026-02-28 07:48:03 -06:00
1 parent 014becfb02
commit b054f51410
2 files changed
+7 -4

No files matched your search

+4 -2
View File
@@ -252,8 +252,10 @@ impl AudioBackend for PipeWireBackend {
buffer_size: if config.exclusive_mode {
BufferSize::Fixed(512) // Lower latency for exclusive mode
} else {
// ~100ms period for fewer CPU wakeups (matches previous vendored cpal tuning)
BufferSize::Fixed(config.sample_rate / 10)
// PipeWire manages its own buffer scheduling via quantum;
// forcing a fixed buffer size here conflicts and causes underruns
// at high sample rates (192kHz)
BufferSize::Default
},
};