Sam Zackrisson 41478c7c1b Remove AudioProcessing::gain_control() getter
This change also resolves a bug in audioproc_f:
The implicit ApplyConfig calls to enable gain control settings in
aec_dump_simulator.cc:377-406 [1] are overwritten by the ApplyConfig
call on line 500 using a config from line 292.

Compared to a ToT build including a fix for that bug, these changes
are bitexact on a large number of aecdumps.

[1] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_processing/test/aec_dump_based_simulator.cc?l=377&rcl=8bbf9e2c6e40feb8efcbf276b43945a14d651e9b

Bug: webrtc:9878
Change-Id: Id427d34e838c999d996d58193977ac2a9198edd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156463
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29481}
2019-10-15 09:23:16 +00:00

118 lines
2.7 KiB
Plaintext

# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../../../webrtc.gni")
rtc_source_set("gain_control_interface") {
sources = [
"gain_control.h",
]
}
rtc_source_set("agc") {
sources = [
"agc_manager_direct.cc",
"agc_manager_direct.h",
]
configs += [ "..:apm_debug_dump" ]
deps = [
":gain_control_interface",
":gain_map",
":level_estimation",
"..:apm_logging",
"../../../common_audio",
"../../../common_audio:common_audio_c",
"../../../rtc_base:checks",
"../../../rtc_base:gtest_prod",
"../../../rtc_base:logging",
"../../../rtc_base:macromagic",
"../../../rtc_base:safe_minmax",
"../../../system_wrappers:metrics",
"../agc2:level_estimation_agc",
"../vad",
]
}
rtc_source_set("level_estimation") {
sources = [
"agc.cc",
"agc.h",
"loudness_histogram.cc",
"loudness_histogram.h",
"utility.cc",
"utility.h",
]
deps = [
"../../../rtc_base:checks",
"../../../rtc_base:macromagic",
"../vad",
]
}
rtc_source_set("agc_legacy_c") {
visibility = [
":*",
"..:*",
] # Only targets in this file and in
# audio_processing can depend on
# this.
sources = [
"legacy/analog_agc.c",
"legacy/analog_agc.h",
"legacy/digital_agc.c",
"legacy/digital_agc.h",
"legacy/gain_control.h",
]
deps = [
"../../../common_audio",
"../../../common_audio:common_audio_c",
"../../../common_audio/third_party/fft4g",
"../../../rtc_base:checks",
"../../../rtc_base:rtc_base_approved",
"../../../system_wrappers:cpu_features_api",
]
if (rtc_build_with_neon) {
if (current_cpu != "arm64") {
# Enable compilation for the NEON instruction set.
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
cflags = [ "-mfpu=neon" ]
}
}
}
rtc_source_set("gain_map") {
sources = [
"gain_map_internal.h",
]
}
if (rtc_include_tests) {
rtc_source_set("agc_unittests") {
testonly = true
sources = [
"agc_manager_direct_unittest.cc",
"loudness_histogram_unittest.cc",
"mock_agc.h",
]
configs += [ "..:apm_debug_dump" ]
deps = [
":agc",
":gain_control_interface",
":level_estimation",
"..:mocks",
"../../../test:fileutils",
"../../../test:test_support",
"//testing/gtest",
]
}
}