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

Unified Diff: webrtc/modules/audio_processing/agc/agc_manager_direct.cc

Issue 2525963002: AGC: Add a histogram for new level (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/agc/agc_manager_direct.cc
diff --git a/webrtc/modules/audio_processing/agc/agc_manager_direct.cc b/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
index dc9ba42d5123eac6f4f1c9276965bb37d09fdf9b..f8fc310c57569aa28dab3a1d440bcc09292f72e7 100644
--- a/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
+++ b/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
@@ -407,7 +407,12 @@ void AgcManagerDirect::UpdateGain() {
if (residual_gain == 0)
return;
+ int old_level = level_;
SetLevel(LevelFromGainError(residual_gain, level_));
+ if (old_level != level_) {
+ // level_ was updated by SetLevel; log the new value.
+ RTC_HISTOGRAM_ENUMERATION("WebRTC.Audio.AgcLevel", level_, kMaxMicLevel);
+ }
}
void AgcManagerDirect::UpdateCompressor() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698