Skip to content

pulse-server: avoid skipping more ringbuffer data than available

Marcin Radomski requested to merge dextero/pipewire:no-random-play into master

This prevents the ringbuffer from advancing the read pointer more than the size of data actually read. It prevents the "avail" value from keeping to drop when no audio is being played by the client.

Applying this patch on the source of Pipewire included in Ubuntu 22.04 LTS and replacing the libpipewire-module-protocol-pulse.so seems to prevent the "randomly playing music after a couple hours of silence" issue (#2366 (closed)).

I admit that I have no prior experience with Pipewire codebase so even though I didn't notice anything being broken when trying it out, I'm not sure if this really doesn't break anything.

Merge request reports