Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Unified Diff: media/audio/audio_manager_base.cc

Issue 61203008: Attempt to fix audio wedges by restarting all streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698