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

Unified Diff: webrtc/modules/audio_processing/include/audio_processing.h

Issue 2543753006: AGC: Route clipping parameter from webrtc::Config to AGC (Closed)
Patch Set: Fix a typo Created 4 years 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
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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/test/debug_dump_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698