Index: webrtc/modules/audio_processing/include/audio_processing.h |
diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h |
index d3ae3e8a6a964a913e05a9cb45fa67504eb84e10..d03c7f4ab4f336189a335f0740ab358808ddf7f6 100644 |
--- a/webrtc/modules/audio_processing/include/audio_processing.h |
+++ b/webrtc/modules/audio_processing/include/audio_processing.h |
@@ -114,15 +114,21 @@ static const int kAgcStartupMinVolume = 85; |
#else |
static const int kAgcStartupMinVolume = 0; |
#endif // defined(WEBRTC_CHROMIUM_BUILD) |
+static constexpr int kClippedLevelMin = 170; |
struct ExperimentalAgc { |
- ExperimentalAgc() : enabled(true), startup_min_volume(kAgcStartupMinVolume) {} |
- explicit ExperimentalAgc(bool enabled) |
- : enabled(enabled), startup_min_volume(kAgcStartupMinVolume) {} |
+ ExperimentalAgc() = default; |
+ explicit ExperimentalAgc(bool enabled) : enabled(enabled) {} |
ExperimentalAgc(bool enabled, int startup_min_volume) |
: enabled(enabled), startup_min_volume(startup_min_volume) {} |
+ ExperimentalAgc(bool enabled, int startup_min_volume, int clipped_level_min) |
+ : enabled(enabled), |
+ startup_min_volume(startup_min_volume), |
+ clipped_level_min(clipped_level_min) {} |
static const ConfigOptionID identifier = ConfigOptionID::kExperimentalAgc; |
- bool enabled; |
- int startup_min_volume; |
+ bool enabled = true; |
+ int startup_min_volume = kAgcStartupMinVolume; |
+ // Lowest microphone level that will be applied in response to clipping. |
+ int clipped_level_min = kClippedLevelMin; |
}; |
// Use to enable experimental noise suppression. It can be set in the |