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

Side by Side Diff: trunk/src/media/audio/audio_output_controller.cc

Issue 101473002: Revert 238325 "Attempt to fix audio wedges by restarting all str..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/audio_output_controller.h" 5 #include "media/audio/audio_output_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 void AudioOutputController::DisallowEntryToOnMoreIOData() { 471 void AudioOutputController::DisallowEntryToOnMoreIOData() {
472 const bool is_zero = !base::AtomicRefCountDec(&num_allowed_io_); 472 const bool is_zero = !base::AtomicRefCountDec(&num_allowed_io_);
473 DCHECK(is_zero); 473 DCHECK(is_zero);
474 } 474 }
475 475
476 void AudioOutputController::WedgeCheck() { 476 void AudioOutputController::WedgeCheck() {
477 DCHECK(message_loop_->BelongsToCurrentThread()); 477 DCHECK(message_loop_->BelongsToCurrentThread());
478 478
479 // If we should be playing and we haven't, that's a wedge. 479 // If we should be playing and we haven't, that's a wedge.
480 if (state_ == kPlaying) { 480 if (state_ == kPlaying) {
481 const bool playback_success = 481 UMA_HISTOGRAM_BOOLEAN("Media.AudioOutputControllerPlaybackStartupSuccess",
482 base::AtomicRefCountIsOne(&on_more_io_data_called_); 482 base::AtomicRefCountIsOne(&on_more_io_data_called_));
483
484 UMA_HISTOGRAM_BOOLEAN(
485 "Media.AudioOutputControllerPlaybackStartupSuccess", playback_success);
486
487 // Let the AudioManager try and fix it.
488 if (!playback_success)
489 audio_manager_->FixWedgedAudio();
490 } 483 }
491 } 484 }
492 485
493 } // namespace media 486 } // namespace media
OLDNEW
« no previous file with comments | « trunk/src/media/audio/audio_manager_base.cc ('k') | trunk/src/media/audio/audio_output_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698