• dalecurtis@google.com's avatar
    Attempt to fix audio wedges by restarting all streams on OSX. · 3d62ff18
    dalecurtis@google.com authored
    Introduces two new methods to AudioOutputDispatcher:
    CloseStreamsForWedgeFix() and RestartStreamsForWedgeFix().
    
    Respectively, each method closes or restarts all active
    streams owned by a given dispatcher.  The process is
    completely transparent to upstream clients.
    
    A new method on AudioManager, FixWedgedAudio() calls
    CloseStreamsForWedgeFix() for all dispatchers and then
    calls RestartStreamsForWedgeFix() afterward.
    
    FixWedgedAudio() is called by each AudioOutputController
    when a wedge is detected.  Multiple in flight wedge checks
    are serialized by the audio thread.  The hope is that wedges
    will be fixed before the next WedgeCheck() fires.
    
    While the methods are available on all platforms, FixWedgedAudio()
    is only wired up on OSX.
    
    BUG=160920
    TEST=unittest. fake wedge and observe stream recreation.
    R=scherkus@chromium.org
    
    Review URL: https://codereview.chromium.org/61203008
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238325 0039d316-1c4b-4281-b951-d872f2087c98
    3d62ff18
audio_output_resampler.cc 14.1 KB