Delay back to back PulseAudio write request callbacks.
commitb435bfbb1b567b7cd57b52d605642dbf84258794
authordalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 1 Aug 2014 07:33:01 +0000 (1 07:33 +0000)
committerdalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 1 Aug 2014 07:33:01 +0000 (1 07:33 +0000)
treebc06534ca32f736294bf21c99b3b5f5ea85cce6c
parent8e1f74614da19cf03c55fea11eec1c08c82db3f8
Delay back to back PulseAudio write request callbacks.

Avoids trampling shared memory when Pulse issues back to back
callbacks for whatever reason.  Locally I hit the sleep many
times per stream without any noticeable glitching.

I've also adjusted the |minreq| value to reduce the number of
callbacks, in practice this shouldn't hurt buffering since we
always write out a full buffer regardless of the amount requested.

BUG=366433
TEST=pulse output is glitch free on WebAudio, HTML5, WebRTC.

Review URL: https://codereview.chromium.org/414313005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286955 0039d316-1c4b-4281-b951-d872f2087c98
media/audio/pulse/pulse_output.cc
media/audio/pulse/pulse_util.cc