summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_manager.h
diff options
context:
space:
mode:
authordalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-04 00:45:47 +0000
committerdalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-04 00:45:47 +0000
commit2f8c23b482763d6c4060dc007389cfd6adc7490e (patch)
tree8ed7cb9d3da482df2af5eb4bfeaabcc539294155 /media/audio/audio_manager.h
parenteded43ded82a05127b0d2bdc4d388be1e3510719 (diff)
downloadchromium_src-2f8c23b482763d6c4060dc007389cfd6adc7490e.zip
chromium_src-2f8c23b482763d6c4060dc007389cfd6adc7490e.tar.gz
chromium_src-2f8c23b482763d6c4060dc007389cfd6adc7490e.tar.bz2
Attempt to fix audio wedges by restarting all streams on OSX.
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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238325 Review URL: https://codereview.chromium.org/61203008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_manager.h')
-rw-r--r--media/audio/audio_manager.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index ab9c82b..a6cb705d 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -175,6 +175,11 @@ class MEDIA_EXPORT AudioManager {
virtual std::string GetAssociatedOutputDeviceID(
const std::string& input_device_id) = 0;
+ // Called when a component has detected a OS level audio wedge. Shuts down
+ // all active audio streams and then restarts them transparently. See
+ // http://crbug.com/160920
+ virtual void FixWedgedAudio() = 0;
+
protected:
AudioManager();