OLD | NEW |
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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "media/base/scoped_histogram_timer.h" | 14 #include "media/base/scoped_histogram_timer.h" |
15 | 15 |
16 using base::Time; | |
17 using base::TimeDelta; | 16 using base::TimeDelta; |
18 | 17 |
19 namespace media { | 18 namespace media { |
20 | 19 |
21 #if defined(AUDIO_POWER_MONITORING) | 20 #if defined(AUDIO_POWER_MONITORING) |
22 // Time constant for AudioPowerMonitor. See AudioPowerMonitor ctor comments for | 21 // Time constant for AudioPowerMonitor. See AudioPowerMonitor ctor comments for |
23 // semantics. This value was arbitrarily chosen, but seems to work well. | 22 // semantics. This value was arbitrarily chosen, but seems to work well. |
24 static const int kPowerMeasurementTimeConstantMillis = 10; | 23 static const int kPowerMeasurementTimeConstantMillis = 10; |
25 | 24 |
26 // Desired frequency of calls to EventHandler::OnPowerMeasured() for reporting | 25 // Desired frequency of calls to EventHandler::OnPowerMeasured() for reporting |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 UMA_HISTOGRAM_BOOLEAN( | 482 UMA_HISTOGRAM_BOOLEAN( |
484 "Media.AudioOutputControllerPlaybackStartupSuccess", playback_success); | 483 "Media.AudioOutputControllerPlaybackStartupSuccess", playback_success); |
485 | 484 |
486 // Let the AudioManager try and fix it. | 485 // Let the AudioManager try and fix it. |
487 if (!playback_success) | 486 if (!playback_success) |
488 audio_manager_->FixWedgedAudio(); | 487 audio_manager_->FixWedgedAudio(); |
489 } | 488 } |
490 } | 489 } |
491 | 490 |
492 } // namespace media | 491 } // namespace media |
OLD | NEW |