GNOME Bugzilla – Bug 639240
pulsesink: PLAYING->PAUSED->PLAYING transition causes dropout
Last modified: 2011-02-15 14:47:32 UTC
This becomes prominent with large buffer-time values - going from PLAYING to PAUSED and then back to PLAYING introduces a gap in playback with pulsesink. The root cause of the problem is that when we cork the stream (while pausing the ringbuffer), we do not actually wait for the cork to complete before proceeding. The stream clock might only really pause after we take a snapshot for start_time. This difference gets taken up as base_time when going back to PLAYING, causing a drop in playback.
Created attachment 178073 [details] [review] pulsesink: Make corking during pause synchronous This makes the call to pa_stream_cork() during ringbuffer pause() synchronous, which makes sure that the clock does not advance after we take a snapshot for start_time.
The complete fix requires another one-liner in PulseAudio that prevents the clock from advancing in the corked state. I will take this up on the PulseAudio side in parallel.
Comment on attachment 178073 [details] [review] pulsesink: Make corking during pause synchronous commit 7280ea1f68fc43ed4850278b0d75c4ba0e61effe Author: Arun Raghavan <arun.raghavan@collabora.co.uk> Date: Tue Jan 11 23:39:12 2011 +0530 pulsesink: Make corking during pause synchronous This makes the call to pa_stream_cork() during ringbuffer pause() synchronous, which makes sure that the clock does not advance after we take a snapshot for start_time. https://bugzilla.gnome.org/show_bug.cgi?id=639240
*** Bug 619634 has been marked as a duplicate of this bug. ***