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

Unified Diff: media/audio/audio_output_controller.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_output_controller.cc
diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc
index af1a122865d9eda188660103f856b665d1a1290d..fc515f1523f99ac52068a94c9765e15463c9bedf 100644
--- a/media/audio/audio_output_controller.cc
+++ b/media/audio/audio_output_controller.cc
@@ -215,7 +215,7 @@ void AudioOutputController::DoPlay() {
// invalidate the previous timer.
wedge_timer_.reset(new base::OneShotTimer<AudioOutputController>());
wedge_timer_->Start(
- FROM_HERE, TimeDelta::FromSeconds(5), this,
+ FROM_HERE, TimeDelta::FromSeconds(1), this,
scherkus (not reviewing) 2013/12/02 21:49:37 FYI changing this value will impact the results of
DaleCurtis 2013/12/02 22:23:59 For safety I'm going to revert this change. Since
&AudioOutputController::WedgeCheck);
handler_->OnPlaying();
@@ -475,8 +475,15 @@ void AudioOutputController::WedgeCheck() {
// If we should be playing and we haven't, that's a wedge.
if (state_ == kPlaying) {
- UMA_HISTOGRAM_BOOLEAN("Media.AudioOutputControllerPlaybackStartupSuccess",
- base::AtomicRefCountIsOne(&on_more_io_data_called_));
+ const bool playback_success =
+ base::AtomicRefCountIsOne(&on_more_io_data_called_);
+
+ UMA_HISTOGRAM_BOOLEAN(
+ "Media.AudioOutputControllerPlaybackStartupSuccess", playback_success);
+
+ // Let the AudioManager try and fix it.
+ if (!playback_success)
+ audio_manager_->FixWedgedAudio();
scherkus (not reviewing) 2013/12/02 21:49:37 Hmm I was under the impression we'd be landing a M
DaleCurtis 2013/12/02 22:23:59 (3) is fine, I wanted to get the idea sanitized be
DaleCurtis 2013/12/02 22:52:08 Actually 3 wasn't possible since the fix requires
}
}

Powered by Google App Engine
This is Rietveld 408576698