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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2240763002: Removed the deactivation of the level controller when there is a built-in AGC available (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index be1888eea338392e0f3952061990d8ba24a776b1..ae8b966e2fe718b84629dbe3ab38ecf0efbee60e 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -683,29 +683,9 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
}
}
- // Use optional to avoid uneccessary calls to BuiltInAGCIsAvailable while
- // complying with the unittest requirements of only 1 call per test.
- rtc::Optional<bool> built_in_agc_avaliable;
- if (options.level_control) {
- if (!built_in_agc_avaliable) {
- built_in_agc_avaliable =
- rtc::Optional<bool>(adm()->BuiltInAGCIsAvailable());
- }
- RTC_DCHECK(built_in_agc_avaliable);
- if (*built_in_agc_avaliable) {
- // Disable internal software level control if built-in AGC is enabled,
- // i.e., replace the software AGC with the built-in AGC.
- options.level_control = rtc::Optional<bool>(false);
- }
- }
-
if (options.auto_gain_control) {
- if (!built_in_agc_avaliable) {
- built_in_agc_avaliable =
- rtc::Optional<bool>(adm()->BuiltInAGCIsAvailable());
- }
- RTC_DCHECK(built_in_agc_avaliable);
- if (*built_in_agc_avaliable) {
+ bool built_in_agc_avaliable = adm()->BuiltInAGCIsAvailable();
+ if (built_in_agc_avaliable) {
if (adm()->EnableBuiltInAGC(*options.auto_gain_control) == 0 &&
*options.auto_gain_control) {
// Disable internal software AGC if built-in AGC is enabled,
« 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