Commit 033cd601 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winepulse.drv: Write data to pulse in pulse_release_render_buffer.

Instead of waiting for the timer loop, which sometimes causes pulse buffer underflows. This greatly reduces the amount of underflows in Prince of Persia: The Forgotten Sands, as well as in Forza Horizon 4 introduction and menu audio, which are suffering from audio clicks since PE xaudio conversion. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52225Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 262c5211
......@@ -1675,6 +1675,9 @@ static NTSTATUS pulse_release_render_buffer(void *args)
stream->clock_written += written_bytes;
stream->locked = 0;
/* push as much data as we can to pulseaudio too */
pulse_write(stream);
TRACE("Released %u, held %lu\n", params->written_frames, stream->held_bytes / pa_frame_size(&stream->ss));
pulse_unlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment