Switch AudioRendererAlgorithm to buffer based on time.
It doesn't make sense to buffer based on a frame count when the
amount of time that data represent varies with sample rate; it's
the opposite of what we want. I.e., a 48kHz playback will exhaust
this buffer faster than a 44.1kHz playback.
Instead, switch to time based initial capacity using the sample
rate provided during initialization. This provides a greater
resilience against underflow when video decoding is overloading
the media thread.
At 48kHz we were previously buffering ~171ms and at 44.1kHz we were
buffering ~186ms of audio data. I've chosen a nice round 200ms for
simplicity and since it works well on an Android One device.
BUG=519108
TEST=media_unittests still pass.
Review URL: https://codereview.chromium.org/
1278733004
Cr-Commit-Position: refs/heads/master@{#343279}