Paused process plays buffered audio when unpaused, causing permanent delay
Version, Distribution, Desktop Environment: pipewire 0.3.19; Void Linux; bspwm (X11)
Description of Problem: After opening a process and pausing it by attaching a debugger or using SIGSTOP, the process' audio output gets permanently offset by the amount of time it was paused for.
How Reproducible: This does not seem to occur for native PipeWire clients (e.g. pw-play); I have successfully reproduced it in several PulseAudio clients (Portal 2 and mpv), although I cannot confirm whether it happens on all of them. mpv reports "Audio device underrun detected", and plays incredibly stuttery audio while delayed; Portal 2 plays the audio fine, it is just delayed. It may be a bug in the Pulse compat layer.
Steps to Reproduce:
- Spawn a process outputting audio over PulseAudio
- Pause it, by attaching a debugger or sending SIGSTOP
- Wait some amount of time, and resume the process
- The audio will be delayed by the amount of time the process was paused for
Actual Results: Delayed (and sometimes broken) audio.
Expected Results: Neither delayed nor broken audio; audio that should have been played while the process was paused is simply dropped.
pw-dump
while an mpv client plays broken & delayed audio: pw_delay_bug_dump