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

Unified Diff: media/audio/audio_output_controller.h

Issue 2902823005: Added logging of average power levels to AudioOutputController. (Closed)
Patch Set: Rebase Created 3 years, 7 months 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
« no previous file with comments | « no previous file | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller.h
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
index 985a1213e27d044a9c94f2aeb87c2ef3f6aefac0..19fba1f9a6830adafcfc74cbdd0668ffad2ba2c3 100644
--- a/media/audio/audio_output_controller.h
+++ b/media/audio/audio_output_controller.h
@@ -222,6 +222,9 @@ class MEDIA_EXPORT AudioOutputController
void BroadcastDataToDuplicationTargets(std::unique_ptr<AudioBus> audio_bus,
base::TimeTicks reference_time);
+ // Log the current average power level measured by power_monitor_.
+ void LogAudioPowerLevel(const std::string& call_name);
+
AudioManager* const audio_manager_;
const AudioParameters params_;
EventHandler* const handler_;
@@ -256,6 +259,9 @@ class MEDIA_EXPORT AudioOutputController
// Scans audio samples from OnMoreData() as input to compute power levels.
AudioPowerMonitor power_monitor_;
+ // Updated each time a power measurement is logged.
+ base::TimeTicks last_audio_level_log_time_;
+
// Flags when we've asked for a stream to start but it never did.
base::AtomicRefCount on_more_io_data_called_;
std::unique_ptr<base::OneShotTimer> wedge_timer_;
« no previous file with comments | « no previous file | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698