Revert 230334 "Improve and simplify AudioOutputDispatcher."
Likely cause of flakiness on Win7 Debug (NVIDIA) bot.
BUG=310838
> Improve and simplify AudioOutputDispatcher.
>
> AudioOutputDispatcher does a number of things which no longer make
> sense in a world where we don't create tons of physical streams:
>
> - Streams are not immediately recycled but instead inserted
> into a paused queue. This was done to improve cycle time
> when physical streams were rapidly paused and played.
>
> - If any stream was paused previously and then closed, every
> new stream opened will open two streams. Again this was to
> improve cycle time for paused and played streams.
>
> For HTML5, this has been handled by AudioRendererMixer for some time.
> WebRTC, WebAudio, and PPAPI generally don't start and stop streams
> repeatedly in a way that this code is beneficial.
>
> As such, all of that code has been removed. As a hedge, one stream
> is left open after Close() until the close timer fires. This allows
> cycle time to be improved in cases of interleaved Start/Stop cycles.
>
> I've additionally cleaned up the code to use std::algorithm where
> applicable, removed unnecessary WeakPtr setup, and cleaned up the
> unittests.
>
> BUG=none
> TEST=audio plays, unittests pass.
>
> Review URL: https://codereview.chromium.org/27605002
TBR=dalecurtis@chromium.org
Review URL: https://codereview.chromium.org/38533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230543 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed