Skip to content

sco-sink: clear port buffers when stopping

P V requested to merge pvir/pipewire:sco-sink-stop-drop into master

Dequeue all buffered data when stopping, so that it won't be output later when starting next time.

Repro: interrupt pw-play with Ctrl+C, and a few seconds afterward restart playback: a few 100ms tail part of the old output plays first. In contrast to sco-sink, a2dp-sink appears to consume buffers fast enough so that the ready queue is empty when stopping, and doesn't suffer from this. Not fully sure if it's intended design that data is left in the buffers when sink is stopped, but here it results to an artefact in practice.

Merge request reports