blob: 0ac47fb201dd743b2b5b3e660dfa880895d2b73c [file] [log] [blame]
Gustaf Ullbergf35c6662018-02-23 13:18:29 +01001# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("//build/config/arm.gni")
10import("../../../webrtc.gni")
11
12config("apm_debug_dump") {
13 if (apm_debug_dump) {
14 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
15 } else {
16 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
17 }
18}
19
20rtc_static_library("aec3") {
21 visibility = [ "*" ]
22 configs += [ ":apm_debug_dump" ]
23 sources = [
24 "adaptive_fir_filter.cc",
25 "adaptive_fir_filter.h",
26 "aec3_common.cc",
27 "aec3_common.h",
28 "aec3_fft.cc",
29 "aec3_fft.h",
30 "aec_state.cc",
31 "aec_state.h",
32 "block_framer.cc",
33 "block_framer.h",
34 "block_processor.cc",
35 "block_processor.h",
36 "block_processor_metrics.cc",
37 "block_processor_metrics.h",
38 "cascaded_biquad_filter.cc",
39 "cascaded_biquad_filter.h",
40 "comfort_noise_generator.cc",
41 "comfort_noise_generator.h",
42 "decimator.cc",
43 "decimator.h",
44 "delay_estimate.h",
45 "downsampled_render_buffer.cc",
46 "downsampled_render_buffer.h",
47 "echo_canceller3.cc",
48 "echo_canceller3.h",
49 "echo_path_delay_estimator.cc",
50 "echo_path_delay_estimator.h",
51 "echo_path_variability.cc",
52 "echo_path_variability.h",
53 "echo_remover.cc",
54 "echo_remover.h",
55 "echo_remover_metrics.cc",
56 "echo_remover_metrics.h",
57 "erl_estimator.cc",
58 "erl_estimator.h",
59 "erle_estimator.cc",
60 "erle_estimator.h",
61 "fft_buffer.cc",
62 "fft_buffer.h",
63 "fft_data.h",
64 "frame_blocker.cc",
65 "frame_blocker.h",
66 "main_filter_update_gain.cc",
67 "main_filter_update_gain.h",
68 "matched_filter.cc",
69 "matched_filter.h",
70 "matched_filter_lag_aggregator.cc",
71 "matched_filter_lag_aggregator.h",
72 "matrix_buffer.cc",
73 "matrix_buffer.h",
74 "output_selector.cc",
75 "output_selector.h",
76 "render_buffer.cc",
77 "render_buffer.h",
78 "render_delay_buffer.cc",
79 "render_delay_buffer.h",
80 "render_delay_controller.cc",
81 "render_delay_controller.h",
82 "render_delay_controller_metrics.cc",
83 "render_delay_controller_metrics.h",
84 "render_signal_analyzer.cc",
85 "render_signal_analyzer.h",
86 "residual_echo_estimator.cc",
87 "residual_echo_estimator.h",
88 "shadow_filter_update_gain.cc",
89 "shadow_filter_update_gain.h",
90 "skew_estimator.cc",
91 "skew_estimator.h",
92 "subtractor.cc",
93 "subtractor.h",
94 "subtractor_output.h",
95 "suppression_filter.cc",
96 "suppression_filter.h",
97 "suppression_gain.cc",
98 "suppression_gain.h",
99 "vector_buffer.cc",
100 "vector_buffer.h",
101 "vector_math.h",
102 ]
103
104 defines = []
105 deps = [
106 "..:aec_core",
107 "..:apm_logging",
108 "..:audio_processing",
109 "../../..:typedefs",
110 "../../../api:array_view",
111 "../../../api:optional",
112 "../../../api/audio:aec3_config",
113 "../../../api/audio:echo_control",
114 "../../../common_audio:common_audio_c",
115 "../../../rtc_base:checks",
116 "../../../rtc_base:rtc_base_approved",
117 "../../../system_wrappers:cpu_features_api",
118 "../../../system_wrappers:metrics_api",
119 ]
120
121 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
122}
123
124if (rtc_include_tests) {
125 rtc_source_set("aec3_unittests") {
126 testonly = true
127
128 configs += [ ":apm_debug_dump" ]
129 sources = [
130 "mock/mock_block_processor.h",
131 "mock/mock_echo_remover.h",
132 "mock/mock_render_delay_buffer.h",
133 "mock/mock_render_delay_controller.h",
134 ]
135
136 deps = [
137 ":aec3",
138 "..:apm_logging",
139 "..:audio_processing",
140 "..:audio_processing_unittests",
141 "../../..:typedefs",
142 "../../../api:array_view",
143 "../../../api:optional",
144 "../../../api/audio:aec3_config",
145 "../../../rtc_base:checks",
146 "../../../rtc_base:rtc_base_approved",
147 "../../../system_wrappers:cpu_features_api",
148 "../../../test:test_support",
149 ]
150
151 defines = []
152
153 if (rtc_enable_protobuf) {
154 sources += [
155 "adaptive_fir_filter_unittest.cc",
156 "aec3_fft_unittest.cc",
157 "aec_state_unittest.cc",
158 "block_framer_unittest.cc",
159 "block_processor_metrics_unittest.cc",
160 "block_processor_unittest.cc",
161 "cascaded_biquad_filter_unittest.cc",
162 "comfort_noise_generator_unittest.cc",
163 "decimator_unittest.cc",
164 "echo_canceller3_unittest.cc",
165 "echo_path_delay_estimator_unittest.cc",
166 "echo_path_variability_unittest.cc",
167 "echo_remover_metrics_unittest.cc",
168 "echo_remover_unittest.cc",
169 "erl_estimator_unittest.cc",
170 "erle_estimator_unittest.cc",
171 "fft_data_unittest.cc",
172 "frame_blocker_unittest.cc",
173 "main_filter_update_gain_unittest.cc",
174 "matched_filter_lag_aggregator_unittest.cc",
175 "matched_filter_unittest.cc",
176 "output_selector_unittest.cc",
177 "render_buffer_unittest.cc",
178 "render_delay_buffer_unittest.cc",
179 "render_delay_controller_metrics_unittest.cc",
180 "render_delay_controller_unittest.cc",
181 "render_signal_analyzer_unittest.cc",
182 "residual_echo_estimator_unittest.cc",
183 "shadow_filter_update_gain_unittest.cc",
184 "skew_estimator_unittest.cc",
185 "subtractor_unittest.cc",
186 "suppression_filter_unittest.cc",
187 "suppression_gain_unittest.cc",
188 "vector_math_unittest.cc",
189 ]
190 }
191
192 if ((!build_with_chromium || is_win) && is_clang) {
193 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
194 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
195 }
196
197 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
198 }
199}