PulseAudio: don't drain the stream right after initial uncorking

The draining was introduced in ae3c8b19c6, apparently as an experiment
doing several changes. But the drain is outside the loop where
freewheeling changes, so the fix must have worked for other reasons.

There doesn't seem to be any benefit from draining at that point. The
stream is already empty. If not, we could have flushed it.

Draining right after uncorking will conceptualy create an intentional
underflow, even though it isn't reported as such. PipeWire seems to
(something like 6-12 months ago) have regressed in handling of that grey
area, causing that *underflow* to cause a request for too much data, and
thus causing constant *overflows* and unusable playback.

This change makes PulseAudio playback work for me again.
This commit is contained in:
Mads Kiilerich 2022-11-01 17:25:11 +01:00 committed by Robin Gareus
parent f47e517c86
commit 04c24be2db
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -1008,9 +1008,6 @@ PulseAudioBackend::main_process_thread ()
}
}
pa_threaded_mainloop_lock (p_mainloop);
sync_pulse (pa_stream_drain (p_stream, stream_operation_cb, this));
_dsp_load_calc.reset ();
stream_latency_update_cb (p_stream, this);