Index: media/audio/audio_manager_base.cc |
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc |
index 7e5910b2fc8a19a9cb38fa57f9ac408f79cc3ef3..c9495e95344eafaa46ef26f7f60d4629a6046a4d 100644 |
--- a/media/audio/audio_manager_base.cc |
+++ b/media/audio/audio_manager_base.cc |
@@ -419,4 +419,18 @@ int AudioManagerBase::GetUserBufferSize() { |
return 0; |
} |
+void AudioManagerBase::FixWedgedAudio() { |
+ DCHECK(message_loop_->BelongsToCurrentThread()); |
+ // Close all active streams across all dispatchers. |
scherkus (not reviewing)
2013/12/02 21:49:37
these two comments aren't very helpful
it'd be mo
DaleCurtis
2013/12/02 22:52:08
Done.
|
+ for (AudioOutputDispatchers::iterator it = output_dispatchers_.begin(); |
+ it != output_dispatchers_.end(); ++it) { |
+ (*it)->dispatcher->CloseStreamsForWedgeFix(); |
+ } |
+ // Recreate all active streams across all dispatchers. |
+ for (AudioOutputDispatchers::iterator it = output_dispatchers_.begin(); |
+ it != output_dispatchers_.end(); ++it) { |
+ (*it)->dispatcher->RestartStreamsForWedgeFix(); |
+ } |
+} |
+ |
} // namespace media |