blob: dca24788451a91b80d6b3924451da2ab1902416a [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 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
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00009import("//build/config/arm.gni")
10import("//third_party/protobuf/proto_library.gni")
mbonadei9aa3f0a2017-01-24 06:58:22 -080011import("../../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000013declare_args() {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000014 # Disables the usual mode where we trust the reported system delay
15 # values the AEC receives. The corresponding define is set appropriately
16 # in the code, but it can be force-enabled here for testing.
17 aec_untrusted_delay_for_testing = false
18}
19
kjellanderb62dbbe2016-09-23 00:38:52 -070020rtc_static_library("audio_processing") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000021 sources = [
peah88950cf2016-03-04 00:12:40 -080022 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000023 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080024 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010025 "aec/echo_cancellation.h",
peah522d71b2017-02-23 05:16:26 -080026 "aec3/adaptive_fir_filter.cc",
27 "aec3/adaptive_fir_filter.h",
28 "aec3/aec3_common.cc",
29 "aec3/aec3_common.h",
30 "aec3/aec3_fft.cc",
31 "aec3/aec3_fft.h",
32 "aec3/aec_state.cc",
33 "aec3/aec_state.h",
peahd0263542017-01-03 04:20:34 -080034 "aec3/block_framer.cc",
35 "aec3/block_framer.h",
36 "aec3/block_processor.cc",
37 "aec3/block_processor.h",
peahe985b3f2017-02-28 22:08:53 -080038 "aec3/block_processor_metrics.cc",
39 "aec3/block_processor_metrics.h",
peahd0263542017-01-03 04:20:34 -080040 "aec3/cascaded_biquad_filter.cc",
41 "aec3/cascaded_biquad_filter.h",
peah522d71b2017-02-23 05:16:26 -080042 "aec3/comfort_noise_generator.cc",
43 "aec3/comfort_noise_generator.h",
Per Åhgren38e2d952017-11-17 14:54:28 +010044 "aec3/decimator.cc",
45 "aec3/decimator.h",
peahcf02cf12017-04-05 14:18:07 -070046 "aec3/downsampled_render_buffer.cc",
47 "aec3/downsampled_render_buffer.h",
peahe0eae3c2016-12-14 01:16:23 -080048 "aec3/echo_canceller3.cc",
49 "aec3/echo_canceller3.h",
peah69221db2017-01-27 03:28:19 -080050 "aec3/echo_path_delay_estimator.cc",
51 "aec3/echo_path_delay_estimator.h",
peah522d71b2017-02-23 05:16:26 -080052 "aec3/echo_path_variability.cc",
peah69221db2017-01-27 03:28:19 -080053 "aec3/echo_path_variability.h",
54 "aec3/echo_remover.cc",
55 "aec3/echo_remover.h",
peahe985b3f2017-02-28 22:08:53 -080056 "aec3/echo_remover_metrics.cc",
57 "aec3/echo_remover_metrics.h",
peah522d71b2017-02-23 05:16:26 -080058 "aec3/erl_estimator.cc",
59 "aec3/erl_estimator.h",
60 "aec3/erle_estimator.cc",
61 "aec3/erle_estimator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010062 "aec3/fft_buffer.cc",
63 "aec3/fft_buffer.h",
peah522d71b2017-02-23 05:16:26 -080064 "aec3/fft_data.h",
peahd0263542017-01-03 04:20:34 -080065 "aec3/frame_blocker.cc",
66 "aec3/frame_blocker.h",
peah522d71b2017-02-23 05:16:26 -080067 "aec3/main_filter_update_gain.cc",
68 "aec3/main_filter_update_gain.h",
peah21920892017-02-08 05:08:56 -080069 "aec3/matched_filter.cc",
70 "aec3/matched_filter.h",
71 "aec3/matched_filter_lag_aggregator.cc",
72 "aec3/matched_filter_lag_aggregator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010073 "aec3/matrix_buffer.cc",
74 "aec3/matrix_buffer.h",
peah522d71b2017-02-23 05:16:26 -080075 "aec3/output_selector.cc",
76 "aec3/output_selector.h",
peahcf02cf12017-04-05 14:18:07 -070077 "aec3/render_buffer.cc",
78 "aec3/render_buffer.h",
peah69221db2017-01-27 03:28:19 -080079 "aec3/render_delay_buffer.cc",
80 "aec3/render_delay_buffer.h",
81 "aec3/render_delay_controller.cc",
82 "aec3/render_delay_controller.h",
peahe985b3f2017-02-28 22:08:53 -080083 "aec3/render_delay_controller_metrics.cc",
84 "aec3/render_delay_controller_metrics.h",
peah522d71b2017-02-23 05:16:26 -080085 "aec3/render_signal_analyzer.cc",
86 "aec3/render_signal_analyzer.h",
87 "aec3/residual_echo_estimator.cc",
88 "aec3/residual_echo_estimator.h",
89 "aec3/shadow_filter_update_gain.cc",
90 "aec3/shadow_filter_update_gain.h",
91 "aec3/subtractor.cc",
92 "aec3/subtractor.h",
93 "aec3/subtractor_output.h",
94 "aec3/suppression_filter.cc",
95 "aec3/suppression_filter.h",
96 "aec3/suppression_gain.cc",
97 "aec3/suppression_gain.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010098 "aec3/vector_buffer.cc",
99 "aec3/vector_buffer.h",
peah5e79b292017-04-12 01:20:45 -0700100 "aec3/vector_math.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000101 "agc/agc.cc",
102 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000103 "agc/agc_manager_direct.cc",
104 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000105 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700106 "agc/loudness_histogram.cc",
107 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000108 "agc/utility.cc",
109 "agc/utility.h",
alessiob3ec96df2017-05-22 06:57:06 -0700110 "agc2/gain_controller2.cc",
111 "agc2/gain_controller2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 "audio_buffer.cc",
113 "audio_buffer.h",
114 "audio_processing_impl.cc",
115 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700116 "beamformer/array_util.cc",
117 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000118 "beamformer/complex_matrix.h",
119 "beamformer/covariance_matrix_generator.cc",
120 "beamformer/covariance_matrix_generator.h",
121 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000122 "beamformer/nonlinear_beamformer.cc",
123 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000124 "common.h",
125 "echo_cancellation_impl.cc",
126 "echo_cancellation_impl.h",
127 "echo_control_mobile_impl.cc",
128 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700129 "echo_detector/circular_buffer.cc",
130 "echo_detector/circular_buffer.h",
131 "echo_detector/mean_variance_estimator.cc",
132 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800133 "echo_detector/moving_max.cc",
134 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700135 "echo_detector/normalized_covariance_estimator.cc",
136 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800137 "gain_control_for_experimental_agc.cc",
138 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000139 "gain_control_impl.cc",
140 "gain_control_impl.h",
peahc19f3122016-10-07 14:54:10 -0700141 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000142 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700143 "include/config.cc",
144 "include/config.h",
peahca4cac72016-06-29 15:26:12 -0700145 "level_controller/biquad_filter.cc",
146 "level_controller/biquad_filter.h",
147 "level_controller/down_sampler.cc",
148 "level_controller/down_sampler.h",
149 "level_controller/gain_applier.cc",
150 "level_controller/gain_applier.h",
151 "level_controller/gain_selector.cc",
152 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700153 "level_controller/level_controller.cc",
154 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700155 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700156 "level_controller/noise_level_estimator.cc",
157 "level_controller/noise_level_estimator.h",
158 "level_controller/noise_spectrum_estimator.cc",
159 "level_controller/noise_spectrum_estimator.h",
160 "level_controller/peak_level_estimator.cc",
161 "level_controller/peak_level_estimator.h",
162 "level_controller/saturating_gain_estimator.cc",
163 "level_controller/saturating_gain_estimator.h",
164 "level_controller/signal_classifier.cc",
165 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000166 "level_estimator_impl.cc",
167 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -0800168 "low_cut_filter.cc",
169 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170 "noise_suppression_impl.cc",
171 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800172 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700173 "residual_echo_detector.cc",
174 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000175 "rms_level.cc",
176 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000177 "splitting_filter.cc",
178 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700179 "three_band_filter_bank.cc",
180 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000181 "transient/common.h",
182 "transient/daubechies_8_wavelet_coeffs.h",
183 "transient/dyadic_decimator.h",
184 "transient/moving_moments.cc",
185 "transient/moving_moments.h",
186 "transient/transient_detector.cc",
187 "transient/transient_detector.h",
188 "transient/transient_suppressor.cc",
189 "transient/transient_suppressor.h",
190 "transient/wpd_node.cc",
191 "transient/wpd_node.h",
192 "transient/wpd_tree.cc",
193 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000194 "typing_detection.cc",
195 "typing_detection.h",
aluebsecf6b812015-06-25 12:28:48 -0700196 "vad/common.h",
197 "vad/gmm.cc",
198 "vad/gmm.h",
199 "vad/noise_gmm_tables.h",
200 "vad/pitch_based_vad.cc",
201 "vad/pitch_based_vad.h",
202 "vad/pitch_internal.cc",
203 "vad/pitch_internal.h",
204 "vad/pole_zero_filter.cc",
205 "vad/pole_zero_filter.h",
206 "vad/standalone_vad.cc",
207 "vad/standalone_vad.h",
208 "vad/vad_audio_proc.cc",
209 "vad/vad_audio_proc.h",
210 "vad/vad_audio_proc_internal.h",
211 "vad/vad_circular_buffer.cc",
212 "vad/vad_circular_buffer.h",
213 "vad/voice_activity_detector.cc",
214 "vad/voice_activity_detector.h",
215 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000216 "voice_detection_impl.cc",
217 "voice_detection_impl.h",
218 ]
219
220 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200221 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100222 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700223 ":aec_dump_interface",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100224 ":apm_logging",
Mirko Bonadei10679932017-12-05 15:07:16 +0100225 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100226 ":audio_processing_statistics",
mbonadei1140f972017-04-26 03:38:35 -0700227 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200228 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700229 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700230 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800231 "../../audio/utility:audio_frame_operations",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100232 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700233 "../../rtc_base:gtest_prod",
234 "../../rtc_base:protobuf_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100235 "../../rtc_base:sanitizer",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100236 "../../system_wrappers:cpu_features_api",
237 "../../system_wrappers:metrics_api",
kwiberg98ab3a42015-09-30 21:54:21 -0700238 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200239 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000240
peahf28a3892016-09-01 08:58:21 -0700241 if (apm_debug_dump) {
242 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700243 } else {
peahf28a3892016-09-01 08:58:21 -0700244 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000245 }
246
247 if (aec_untrusted_delay_for_testing) {
248 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
249 }
250
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000251 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000252 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
253 deps += [ ":audioproc_debug_proto" ]
254 }
255
peah1bcfce52016-08-26 07:16:04 -0700256 if (rtc_enable_intelligibility_enhancer) {
257 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
258 sources += [
259 "intelligibility/intelligibility_enhancer.cc",
260 "intelligibility/intelligibility_enhancer.h",
261 "intelligibility/intelligibility_utils.cc",
262 "intelligibility/intelligibility_utils.h",
263 ]
264 } else {
265 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
266 }
267
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000268 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000270 } else {
271 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000272 }
273
kjellander8f4419b2016-06-02 02:09:52 -0700274 # TODO(jschuh): Bug 1348: fix this warning.
275 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000276
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000277 deps += [
278 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100279 "../../common_audio:fir_filter",
280 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700281 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000282 "../../system_wrappers",
283 ]
284}
285
Ivo Creusen56d46092017-11-24 17:29:59 +0100286rtc_source_set("audio_processing_statistics") {
287 sources = [
288 "include/audio_processing_statistics.cc",
289 "include/audio_processing_statistics.h",
290 ]
291 deps = [
292 "../../api:optional",
293 ]
294}
295
aleloi868f32f2017-05-23 07:20:05 -0700296rtc_source_set("aec_dump_interface") {
297 sources = [
298 "include/aec_dump.cc",
299 "include/aec_dump.h",
300 ]
301
302 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700303 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700304 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700305 ]
306}
307
kjellander7439f972016-12-05 22:47:46 -0800308rtc_source_set("audio_processing_c") {
309 visibility = [ ":*" ] # Only targets in this file can depend on this.
310 sources = [
311 "agc/legacy/analog_agc.c",
312 "agc/legacy/analog_agc.h",
313 "agc/legacy/digital_agc.c",
314 "agc/legacy/digital_agc.h",
315 "agc/legacy/gain_control.h",
316 ]
317
318 if (rtc_prefer_fixed_point) {
319 sources += [
320 "ns/noise_suppression_x.c",
321 "ns/noise_suppression_x.h",
322 "ns/nsx_core.c",
323 "ns/nsx_core.h",
324 "ns/nsx_defines.h",
325 ]
326 if (current_cpu == "mipsel") {
327 sources += [ "ns/nsx_core_mips.c" ]
328 } else {
329 sources += [ "ns/nsx_core_c.c" ]
330 }
331 } else {
332 sources += [
333 "ns/defines.h",
334 "ns/noise_suppression.c",
335 "ns/noise_suppression.h",
336 "ns/ns_core.c",
337 "ns/ns_core.h",
338 "ns/windows_private.h",
339 ]
340 }
341
342 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800343 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800344 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100345 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700346 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100347 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800348 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800349
350 if (rtc_build_with_neon) {
351 deps += [ ":audio_processing_neon_c" ]
352 }
kjellander7439f972016-12-05 22:47:46 -0800353}
354
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000355if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000356 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200357 sources = [
358 "debug.proto",
359 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000360
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200361 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000362 }
363}
364
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100365rtc_source_set("apm_logging") {
366 sources = [
367 "logging/apm_data_dumper.cc",
368 "logging/apm_data_dumper.h",
369 ]
370 deps = [
371 "../../api:array_view",
372 "../../common_audio:common_audio",
373 "../../rtc_base:rtc_base_approved",
374 ]
375 defines = []
376 if (apm_debug_dump) {
377 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
378 } else {
379 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
380 }
381}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000382
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100383rtc_source_set("aec_core") {
384 sources = [
385 "aec/aec_core.cc",
386 "aec/aec_core.h",
387 "aec/aec_core_optimized_methods.h",
388 "aecm/aecm_core.cc",
389 "aecm/aecm_core.h",
390 "aecm/echo_control_mobile.cc",
391 "aecm/echo_control_mobile.h",
392 "utility/block_mean_calculator.cc",
393 "utility/block_mean_calculator.h",
394 "utility/delay_estimator.cc",
395 "utility/delay_estimator.h",
396 "utility/delay_estimator_internal.h",
397 "utility/delay_estimator_wrapper.cc",
398 "utility/delay_estimator_wrapper.h",
399 "utility/ooura_fft.cc",
400 "utility/ooura_fft.h",
401 "utility/ooura_fft_tables_common.h",
402 ]
403 deps = [
404 ":apm_logging",
405 ":audio_processing_statistics",
406 "../..:webrtc_common",
407 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100408 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100409 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100410 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100411 "../../system_wrappers:cpu_features_api",
412 "../../system_wrappers:metrics_api",
413 ]
414 cflags = []
415 defines = []
416
417 if (current_cpu == "x86" || current_cpu == "x64") {
418 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800419 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700420 "utility/ooura_fft_sse2.cc",
421 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000422 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200423 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100424 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700425 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000426 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000427
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100428 if (rtc_build_with_neon) {
429 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800430 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700431 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700432 "utility/ooura_fft_neon.cc",
433 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000434 ]
435
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000436 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700437 # Enable compilation for the NEON instruction set. This is needed
438 # since //build/config/arm.gni only enables NEON for iOS, not Android.
439 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700440 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100441 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000442 }
443
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700444 # Disable LTO on NEON targets due to compiler bug.
445 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000446 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000447 cflags -= [
448 "-flto",
449 "-ffat-lto-objects",
450 ]
451 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700452
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100453 deps += [
kjellander7439f972016-12-05 22:47:46 -0800454 ":audio_processing_neon_c",
Mirko Bonadei10679932017-12-05 15:07:16 +0100455 "../../common_audio",
kjellander7439f972016-12-05 22:47:46 -0800456 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000457 }
kjellander7439f972016-12-05 22:47:46 -0800458
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100459 if (current_cpu == "mipsel") {
460 sources += [ "aecm/aecm_core_mips.cc" ]
461 if (mips_float_abi == "hard") {
462 sources += [
463 "aec/aec_core_mips.cc",
464 "utility/ooura_fft_mips.cc",
465 ]
466 }
467 } else {
468 sources += [ "aecm/aecm_core_c.cc" ]
469 }
470 if (apm_debug_dump) {
471 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
472 } else {
473 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
474 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100475
476 # TODO(jschuh): Bug 1348: fix this warning.
477 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100478}
479
480if (rtc_build_with_neon) {
kjellander7439f972016-12-05 22:47:46 -0800481 rtc_static_library("audio_processing_neon_c") {
mbonadeie5dc3ce2017-01-25 05:34:46 -0800482 # TODO(mbonadei): Remove (bugs.webrtc.org/6828)
483 # Errors on cyclic dependency with :audio_processing_c if enabled.
484 check_includes = false
485
kjellander7439f972016-12-05 22:47:46 -0800486 sources = [
487 "ns/nsx_core_neon.c",
488 ]
489
490 if (current_cpu != "arm64") {
491 # Enable compilation for the NEON instruction set. This is needed
492 # since //build/config/arm.gni only enables NEON for iOS, not Android.
493 # This provides the same functionality as webrtc/build/arm_neon.gypi.
494 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
495 cflags = [ "-mfpu=neon" ]
496 }
497
498 # Disable LTO on NEON targets due to compiler bug.
499 # TODO(fdegans): Enable this. See crbug.com/408997.
500 if (rtc_use_lto) {
501 cflags -= [
502 "-flto",
503 "-ffat-lto-objects",
504 ]
505 }
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800506 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700507 "../../rtc_base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800508 ]
kjellander7439f972016-12-05 22:47:46 -0800509 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000510}
kjellanderfb114242016-06-13 00:19:48 -0700511
512if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -0700513 group("audio_processing_tests") {
514 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100515 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700516 ":audioproc_test_utils",
517 ":click_annotate",
518 ":nonlinear_beamformer_test",
519 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700520 ]
521
522 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100523 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700524 }
525
526 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100527 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800528 ":audioproc_f",
529 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200530 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700531 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800532 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800533 ]
kjellander6ceab082016-10-28 05:44:03 -0700534 }
535 }
536
ehmaldonado36268652017-01-19 08:27:11 -0800537 rtc_source_set("audio_processing_unittests") {
538 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700539
ehmaldonado36268652017-01-19 08:27:11 -0800540 sources = [
541 "aec/echo_cancellation_unittest.cc",
542 "aec/system_delay_unittest.cc",
543 "agc/agc_manager_direct_unittest.cc",
544 "agc/loudness_histogram_unittest.cc",
545 "agc/mock_agc.h",
546 "audio_buffer_unittest.cc",
547 "beamformer/array_util_unittest.cc",
548 "beamformer/complex_matrix_unittest.cc",
549 "beamformer/covariance_matrix_generator_unittest.cc",
550 "beamformer/matrix_unittest.cc",
551 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800552 "config_unittest.cc",
553 "echo_cancellation_impl_unittest.cc",
554 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200555 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800556 "transient/dyadic_decimator_unittest.cc",
557 "transient/file_utils.cc",
558 "transient/file_utils.h",
559 "transient/file_utils_unittest.cc",
560 "transient/moving_moments_unittest.cc",
561 "transient/transient_detector_unittest.cc",
562 "transient/transient_suppressor_unittest.cc",
563 "transient/wpd_node_unittest.cc",
564 "transient/wpd_tree_unittest.cc",
565 "utility/block_mean_calculator_unittest.cc",
566 "utility/delay_estimator_unittest.cc",
567 "vad/gmm_unittest.cc",
568 "vad/pitch_based_vad_unittest.cc",
569 "vad/pitch_internal_unittest.cc",
570 "vad/pole_zero_filter_unittest.cc",
571 "vad/standalone_vad_unittest.cc",
572 "vad/vad_audio_proc_unittest.cc",
573 "vad/vad_circular_buffer_unittest.cc",
574 "vad/voice_activity_detector_unittest.cc",
575 ]
576
577 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100578 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200579 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100580 ":apm_logging",
ehmaldonado36268652017-01-19 08:27:11 -0800581 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800582 ":audioproc_test_utils",
mbonadei1140f972017-04-26 03:38:35 -0700583 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800584 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700585 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700586 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800587 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100588 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700589 "../../rtc_base:gtest_prod",
590 "../../rtc_base:protobuf_utils",
591 "../../rtc_base:rtc_base",
592 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100593 "../../system_wrappers",
594 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800595 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200596 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700597 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700598 "test/conversational_speech:unittest",
ehmaldonado36268652017-01-19 08:27:11 -0800599 "//testing/gmock",
600 "//testing/gtest",
601 ]
602
603 defines = []
604
605 if (apm_debug_dump) {
606 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
607 } else {
608 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
609 }
610
611 if (rtc_enable_intelligibility_enhancer) {
612 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
613 sources += [
614 "intelligibility/intelligibility_enhancer_unittest.cc",
615 "intelligibility/intelligibility_utils_unittest.cc",
616 ]
617 } else {
618 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
619 }
620
621 if (rtc_prefer_fixed_point) {
622 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
623 } else {
624 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
625 }
626
627 if (rtc_enable_protobuf) {
628 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
629 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800630 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800631 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200632 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800633 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700634 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700635 "aec_dump",
636 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800637 ]
638 sources += [
peah522d71b2017-02-23 05:16:26 -0800639 "aec3/adaptive_fir_filter_unittest.cc",
640 "aec3/aec3_fft_unittest.cc",
641 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800642 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800643 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800644 "aec3/block_processor_unittest.cc",
645 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800646 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100647 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800648 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800649 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800650 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800651 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800652 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800653 "aec3/erl_estimator_unittest.cc",
654 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800655 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800656 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800657 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800658 "aec3/matched_filter_lag_aggregator_unittest.cc",
659 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800660 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700661 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800662 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800663 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800664 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800665 "aec3/render_signal_analyzer_unittest.cc",
666 "aec3/residual_echo_estimator_unittest.cc",
667 "aec3/shadow_filter_update_gain_unittest.cc",
668 "aec3/subtractor_unittest.cc",
669 "aec3/suppression_filter_unittest.cc",
670 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700671 "aec3/vector_math_unittest.cc",
alessiob3ec96df2017-05-22 06:57:06 -0700672 "agc2/gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800673 "audio_processing_impl_locking_unittest.cc",
674 "audio_processing_impl_unittest.cc",
675 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800676 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800677 "echo_cancellation_bit_exact_unittest.cc",
678 "echo_control_mobile_unittest.cc",
679 "echo_detector/circular_buffer_unittest.cc",
680 "echo_detector/mean_variance_estimator_unittest.cc",
681 "echo_detector/moving_max_unittest.cc",
682 "echo_detector/normalized_covariance_estimator_unittest.cc",
683 "gain_control_unittest.cc",
684 "level_controller/level_controller_unittest.cc",
685 "level_estimator_unittest.cc",
686 "low_cut_filter_unittest.cc",
687 "noise_suppression_unittest.cc",
688 "residual_echo_detector_unittest.cc",
689 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800690 "test/debug_dump_replayer.cc",
691 "test/debug_dump_replayer.h",
692 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800693 "test/echo_canceller_test_tools.cc",
694 "test/echo_canceller_test_tools.h",
695 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800696 "test/test_utils.h",
697 "voice_detection_unittest.cc",
698 ]
699 }
700
701 if ((!build_with_chromium || is_win) && is_clang) {
702 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
703 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
704 }
705 }
706
ehmaldonado021eef32017-01-05 07:09:50 -0800707 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800708 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700709
ehmaldonado021eef32017-01-05 07:09:50 -0800710 sources = [
711 "audio_processing_performance_unittest.cc",
712 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800713 ]
714 deps = [
715 ":audio_processing",
716 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100717 "../../api:array_view",
718 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700719 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100720 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100721 "../../system_wrappers",
Edward Lemur8b886bb2017-12-13 13:23:17 +0100722 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100723 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800724 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700725
ehmaldonado021eef32017-01-05 07:09:50 -0800726 if (rtc_enable_intelligibility_enhancer) {
727 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
728 } else {
729 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
730 }
731 }
732
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200733 rtc_source_set("analog_mic_simulation") {
734 sources = [
735 "test/fake_recording_device.cc",
736 "test/fake_recording_device.h",
737 ]
738 deps = [
739 "../../api:array_view",
740 "../../common_audio:common_audio",
741 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100742 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200743 "../../rtc_base:rtc_base_approved",
744 ]
745 }
746
ehmaldonado1fd08c12017-01-17 02:37:34 -0800747 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800748 rtc_executable("audioproc_f") {
749 testonly = true
750 sources = [
751 "test/aec_dump_based_simulator.cc",
752 "test/aec_dump_based_simulator.h",
753 "test/audio_processing_simulator.cc",
754 "test/audio_processing_simulator.h",
755 "test/audioproc_float.cc",
756 "test/wav_based_simulator.cc",
757 "test/wav_based_simulator.h",
758 ]
peahc3ec1fd2016-08-07 23:19:30 -0700759
ehmaldonado1fd08c12017-01-17 02:37:34 -0800760 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200761 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800762 ":audio_processing",
763 ":audioproc_debug_proto",
764 ":audioproc_protobuf_utils",
765 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700766 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800767 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100768 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700769 "../../rtc_base:protobuf_utils",
770 "../../rtc_base:rtc_base_approved",
771 "../../rtc_base:rtc_task_queue",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800772 "../../system_wrappers",
773 "../../system_wrappers:system_wrappers_default",
774 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700775 "aec_dump",
776 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800777 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800778 ]
779 } # audioproc_f
780 }
peahc3ec1fd2016-08-07 23:19:30 -0700781
ehmaldonado38a21322016-09-02 04:10:34 -0700782 rtc_source_set("audioproc_test_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700783 testonly = true
784 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700785 "test/audio_buffer_tools.cc",
786 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200787 "test/bitexactness_tools.cc",
788 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800789 "test/performance_timer.cc",
790 "test/performance_timer.h",
791 "test/simulator_buffers.cc",
792 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700793 "test/test_utils.cc",
794 "test/test_utils.h",
795 ]
796
kjellanderfb114242016-06-13 00:19:48 -0700797 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800798 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700799 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700800 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700801 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700802 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100803 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700804 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100805 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200806 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200807 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200808 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700809 ]
810 }
811
ehmaldonado38a21322016-09-02 04:10:34 -0700812 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700813 testonly = true
814 sources = [
815 "transient/file_utils.cc",
816 "transient/file_utils.h",
817 "transient/transient_suppression_test.cc",
818 ]
819 deps = [
820 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700821 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800822 "../..:webrtc_common",
823 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700824 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100825 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100826 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700827 "../../test:test_support",
828 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700829 ]
kwiberg7a770e02016-08-25 02:32:43 -0700830 }
831
ehmaldonado38a21322016-09-02 04:10:34 -0700832 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700833 testonly = true
834 sources = [
835 "transient/click_annotate.cc",
836 "transient/file_utils.cc",
837 "transient/file_utils.h",
838 ]
839 deps = [
840 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800841 "../..:webrtc_common",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100842 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700843 "../../system_wrappers:metrics_default",
844 ]
845 }
846
ehmaldonado38a21322016-09-02 04:10:34 -0700847 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700848 testonly = true
849 sources = [
850 "beamformer/nonlinear_beamformer_test.cc",
851 ]
852 deps = [
853 ":audio_processing",
854 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800855 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100856 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700857 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700858 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700859 ]
kwiberg7a770e02016-08-25 02:32:43 -0700860 }
861
peah1bcfce52016-08-26 07:16:04 -0700862 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700863 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700864 testonly = true
865 sources = [
866 "intelligibility/test/intelligibility_proc.cc",
867 ]
868 deps = [
869 ":audio_processing",
870 ":audioproc_test_utils",
oprypin6e09d872017-08-31 03:21:39 -0700871 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700872 "../../system_wrappers:metrics_default",
873 "../../test:test_support",
874 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700875 ]
kwiberg7a770e02016-08-25 02:32:43 -0700876 }
877 }
878
kjellanderfb114242016-06-13 00:19:48 -0700879 if (rtc_enable_protobuf) {
880 proto_library("audioproc_unittest_proto") {
881 sources = [
882 "test/unittest.proto",
883 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200884 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700885 }
886
kjellanderb62dbbe2016-09-23 00:38:52 -0700887 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700888 sources = [
889 "test/protobuf_utils.cc",
890 "test/protobuf_utils.h",
891 ]
892
893 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700894 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800895 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700896 "../../rtc_base:protobuf_utils",
897 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700898 ]
899 }
900 }
901}