AGC: Add a histogram for new level

The histogram will log a new value every time the AGC changes level_.

BUG=webrtc:6622

Review-Url: https://codereview.webrtc.org/2525963002
Cr-Commit-Position: refs/heads/master@{#15222}
This commit is contained in:
henrik.lundin 2016-11-24 01:42:46 -08:00 committed by Commit bot
parent c42d37646f
commit 3edc7f05f5

View File

@ -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() {