blob: 7f89509014caa65d42f89422bd1c21eda2a492f1 [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")
mbonadei9aa3f0a2017-01-24 06:58:22 -080010import("../../webrtc.gni")
Dan Minor9c686132018-01-15 10:20:00 -050011if (!build_with_mozilla) {
12 import("//third_party/protobuf/proto_library.gni")
13}
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000014
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000015declare_args() {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000016 # Disables the usual mode where we trust the reported system delay
17 # values the AEC receives. The corresponding define is set appropriately
18 # in the code, but it can be force-enabled here for testing.
19 aec_untrusted_delay_for_testing = false
20}
21
Patrik Höglundd75c8dc2017-12-19 09:45:24 +010022config("apm_debug_dump") {
23 if (apm_debug_dump) {
24 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
25 } else {
26 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
27 }
28}
29
kjellanderb62dbbe2016-09-23 00:38:52 -070030rtc_static_library("audio_processing") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000031 visibility = [ "*" ]
Patrik Höglundd75c8dc2017-12-19 09:45:24 +010032 configs += [ ":apm_debug_dump" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000033 sources = [
peah88950cf2016-03-04 00:12:40 -080034 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000035 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080036 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010037 "aec/echo_cancellation.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000038 "agc/agc.cc",
39 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000040 "agc/agc_manager_direct.cc",
41 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000042 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -070043 "agc/loudness_histogram.cc",
44 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000045 "agc/utility.cc",
46 "agc/utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000047 "audio_buffer.cc",
48 "audio_buffer.h",
49 "audio_processing_impl.cc",
50 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -070051 "beamformer/array_util.cc",
52 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000053 "beamformer/complex_matrix.h",
54 "beamformer/covariance_matrix_generator.cc",
55 "beamformer/covariance_matrix_generator.h",
56 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000057 "beamformer/nonlinear_beamformer.cc",
58 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000059 "common.h",
60 "echo_cancellation_impl.cc",
61 "echo_cancellation_impl.h",
62 "echo_control_mobile_impl.cc",
63 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -070064 "echo_detector/circular_buffer.cc",
65 "echo_detector/circular_buffer.h",
66 "echo_detector/mean_variance_estimator.cc",
67 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -080068 "echo_detector/moving_max.cc",
69 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -070070 "echo_detector/normalized_covariance_estimator.cc",
71 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -080072 "gain_control_for_experimental_agc.cc",
73 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000074 "gain_control_impl.cc",
75 "gain_control_impl.h",
Alex Loikoe36e8bb2018-02-16 11:54:07 +010076 "gain_controller2.cc",
77 "gain_controller2.h",
peahc19f3122016-10-07 14:54:10 -070078 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000079 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -070080 "include/config.cc",
81 "include/config.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000082 "level_estimator_impl.cc",
83 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -080084 "low_cut_filter.cc",
85 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000086 "noise_suppression_impl.cc",
87 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -080088 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -070089 "residual_echo_detector.cc",
90 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000091 "rms_level.cc",
92 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +000093 "splitting_filter.cc",
94 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -070095 "three_band_filter_bank.cc",
96 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000097 "transient/common.h",
98 "transient/daubechies_8_wavelet_coeffs.h",
99 "transient/dyadic_decimator.h",
100 "transient/moving_moments.cc",
101 "transient/moving_moments.h",
102 "transient/transient_detector.cc",
103 "transient/transient_detector.h",
104 "transient/transient_suppressor.cc",
105 "transient/transient_suppressor.h",
106 "transient/wpd_node.cc",
107 "transient/wpd_node.h",
108 "transient/wpd_tree.cc",
109 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000110 "typing_detection.cc",
111 "typing_detection.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 "voice_detection_impl.cc",
113 "voice_detection_impl.h",
114 ]
115
116 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200117 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100118 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700119 ":aec_dump_interface",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100120 ":apm_logging",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100121 ":audio_frame_view",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100122 ":audio_generator_interface",
Mirko Bonadei10679932017-12-05 15:07:16 +0100123 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100124 ":audio_processing_statistics",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100125 "../..:typedefs",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200126 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700127 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700128 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100129 "../../api/audio:aec3_config",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200130 "../../api/audio:audio_frame_api",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100131 "../../api/audio:echo_control",
aleloi6321b492016-12-05 01:46:09 -0800132 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100133 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100134 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100135 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700136 "../../rtc_base:gtest_prod",
137 "../../rtc_base:protobuf_utils",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100138 "../../rtc_base:safe_minmax",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100139 "../../rtc_base:sanitizer",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100140 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100141 "../../system_wrappers:cpu_features_api",
Per Åhgren11556462017-12-22 16:13:57 +0100142 "../../system_wrappers:field_trial_api",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100143 "../../system_wrappers:metrics_api",
Alex Loiko2bac8962018-03-27 13:38:36 +0200144 "agc2:adaptive_digital",
145 "agc2:fixed_digital",
Alex Loikob5c9a792018-04-16 16:31:22 +0200146 "agc2:gain_applier",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100147 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200148 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000150 if (aec_untrusted_delay_for_testing) {
151 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
152 }
153
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000154 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000155 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
156 deps += [ ":audioproc_debug_proto" ]
157 }
158
peah1bcfce52016-08-26 07:16:04 -0700159 if (rtc_enable_intelligibility_enhancer) {
160 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
161 sources += [
162 "intelligibility/intelligibility_enhancer.cc",
163 "intelligibility/intelligibility_enhancer.h",
164 "intelligibility/intelligibility_utils.cc",
165 "intelligibility/intelligibility_utils.h",
166 ]
167 } else {
168 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
169 }
170
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000171 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000172 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173 } else {
174 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000175 }
176
kjellander8f4419b2016-06-02 02:09:52 -0700177 # TODO(jschuh): Bug 1348: fix this warning.
178 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000179
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000180 deps += [
181 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100182 "../../common_audio:fir_filter",
183 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700184 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000185 "../../system_wrappers",
186 ]
187}
188
Ivo Creusen56d46092017-11-24 17:29:59 +0100189rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000190 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100191 sources = [
192 "include/audio_processing_statistics.cc",
193 "include/audio_processing_statistics.h",
194 ]
195 deps = [
196 "../../api:optional",
197 ]
198}
199
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100200rtc_source_set("audio_frame_view") {
201 sources = [
202 "include/audio_frame_view.h",
203 ]
204 deps = [
205 "../../api:array_view",
206 ]
207}
208
aleloi868f32f2017-05-23 07:20:05 -0700209rtc_source_set("aec_dump_interface") {
210 sources = [
211 "include/aec_dump.cc",
212 "include/aec_dump.h",
213 ]
214
215 deps = [
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100216 ":audio_frame_view",
kwiberg529662a2017-09-04 05:43:17 -0700217 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200218 "../../api/audio:audio_frame_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700219 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700220 ]
221}
222
Sam Zackrisson4d364492018-03-02 16:03:21 +0100223rtc_source_set("audio_generator_interface") {
224 visibility = [ "*" ]
225 sources = [
226 "include/audio_generator.h",
227 ]
228 deps = [
229 ":audio_frame_view",
230 "../../rtc_base:rtc_base_approved",
231 "../../system_wrappers:system_wrappers",
232 ]
233}
234
235rtc_source_set("audio_generator_factory") {
236 visibility = [ "*" ]
237 sources = [
238 "include/audio_generator_factory.cc",
239 "include/audio_generator_factory.h",
240 ]
241 deps = [
242 ":audio_generator_interface",
243 ":file_audio_generator",
244 "../../common_audio:common_audio",
245 "../../rtc_base:rtc_base_approved",
246 "../../system_wrappers:system_wrappers",
247 ]
248}
249
250rtc_source_set("file_audio_generator") {
251 sources = [
252 "audio_generator/file_audio_generator.cc",
253 "audio_generator/file_audio_generator.h",
254 ]
255 deps = [
256 ":audio_generator_interface",
257 "../../common_audio:common_audio",
258 "../../rtc_base:rtc_base_approved",
259 "../../system_wrappers:system_wrappers",
260 ]
261}
262
kjellander7439f972016-12-05 22:47:46 -0800263rtc_source_set("audio_processing_c") {
264 visibility = [ ":*" ] # Only targets in this file can depend on this.
265 sources = [
266 "agc/legacy/analog_agc.c",
267 "agc/legacy/analog_agc.h",
268 "agc/legacy/digital_agc.c",
269 "agc/legacy/digital_agc.h",
270 "agc/legacy/gain_control.h",
271 ]
272
273 if (rtc_prefer_fixed_point) {
274 sources += [
275 "ns/noise_suppression_x.c",
276 "ns/noise_suppression_x.h",
277 "ns/nsx_core.c",
278 "ns/nsx_core.h",
279 "ns/nsx_defines.h",
280 ]
281 if (current_cpu == "mipsel") {
282 sources += [ "ns/nsx_core_mips.c" ]
283 } else {
284 sources += [ "ns/nsx_core_c.c" ]
285 }
286 } else {
287 sources += [
288 "ns/defines.h",
289 "ns/noise_suppression.c",
290 "ns/noise_suppression.h",
291 "ns/ns_core.c",
292 "ns/ns_core.h",
293 "ns/windows_private.h",
294 ]
295 }
296
297 deps = [
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100298 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800299 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800300 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100301 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100302 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700303 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100304 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800305 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800306
307 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100308 sources += [ "ns/nsx_core_neon.c" ]
309
310 if (current_cpu != "arm64") {
311 # Enable compilation for the NEON instruction set. This is needed
312 # since //build/config/arm.gni only enables NEON for iOS, not Android.
313 # This provides the same functionality as webrtc/build/arm_neon.gypi.
314 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
315 cflags = [ "-mfpu=neon" ]
316 }
317
318 # Disable LTO on NEON targets due to compiler bug.
319 # TODO(fdegans): Enable this. See crbug.com/408997.
320 if (rtc_use_lto) {
321 cflags -= [
322 "-flto",
323 "-ffat-lto-objects",
324 ]
325 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800326 }
kjellander7439f972016-12-05 22:47:46 -0800327}
328
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000329if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000330 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200331 sources = [
332 "debug.proto",
333 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000334
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200335 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000336 }
337}
338
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100339rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100340 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100341 sources = [
342 "logging/apm_data_dumper.cc",
343 "logging/apm_data_dumper.h",
344 ]
345 deps = [
346 "../../api:array_view",
347 "../../common_audio:common_audio",
348 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100349 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100350 ]
351 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100352}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000353
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100354rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100355 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100356 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100357 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100358 "aec/aec_core.cc",
359 "aec/aec_core.h",
360 "aec/aec_core_optimized_methods.h",
361 "aecm/aecm_core.cc",
362 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100363 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100364 "aecm/echo_control_mobile.cc",
365 "aecm/echo_control_mobile.h",
366 "utility/block_mean_calculator.cc",
367 "utility/block_mean_calculator.h",
368 "utility/delay_estimator.cc",
369 "utility/delay_estimator.h",
370 "utility/delay_estimator_internal.h",
371 "utility/delay_estimator_wrapper.cc",
372 "utility/delay_estimator_wrapper.h",
373 "utility/ooura_fft.cc",
374 "utility/ooura_fft.h",
375 "utility/ooura_fft_tables_common.h",
376 ]
377 deps = [
378 ":apm_logging",
379 ":audio_processing_statistics",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100380 "../..:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100381 "../..:webrtc_common",
382 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100383 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100384 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100385 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100386 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100387 "../../system_wrappers:cpu_features_api",
388 "../../system_wrappers:metrics_api",
389 ]
390 cflags = []
391 defines = []
392
393 if (current_cpu == "x86" || current_cpu == "x64") {
394 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800395 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700396 "utility/ooura_fft_sse2.cc",
397 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000398 ]
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -0700399 if (is_posix || is_fuchsia) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100400 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700401 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000402 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000403
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100404 if (rtc_build_with_neon) {
405 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800406 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700407 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700408 "utility/ooura_fft_neon.cc",
409 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000410 ]
411
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000412 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700413 # Enable compilation for the NEON instruction set. This is needed
414 # since //build/config/arm.gni only enables NEON for iOS, not Android.
415 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700416 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100417 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000418 }
419
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700420 # Disable LTO on NEON targets due to compiler bug.
421 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000422 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000423 cflags -= [
424 "-flto",
425 "-ffat-lto-objects",
426 ]
427 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700428
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100429 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000430 }
kjellander7439f972016-12-05 22:47:46 -0800431
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100432 if (current_cpu == "mipsel") {
433 sources += [ "aecm/aecm_core_mips.cc" ]
434 if (mips_float_abi == "hard") {
435 sources += [
436 "aec/aec_core_mips.cc",
437 "utility/ooura_fft_mips.cc",
438 ]
439 }
440 } else {
441 sources += [ "aecm/aecm_core_c.cc" ]
442 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100443
444 # TODO(jschuh): Bug 1348: fix this warning.
445 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100446}
447
kjellanderfb114242016-06-13 00:19:48 -0700448if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100449 rtc_source_set("mocks") {
450 testonly = true
451 sources = [
452 "include/mock_audio_processing.h",
453 ]
454 deps = [
455 ":aec_dump_interface",
456 ":audio_processing",
457 ":audio_processing_statistics",
458 "../../test:test_support",
459 ]
460 }
461
kjellander6ceab082016-10-28 05:44:03 -0700462 group("audio_processing_tests") {
463 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100464 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700465 ":audioproc_test_utils",
466 ":click_annotate",
467 ":nonlinear_beamformer_test",
468 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700469 ]
470
471 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100472 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700473 }
474
475 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100476 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800477 ":audioproc_f",
478 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200479 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700480 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800481 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800482 ]
kjellander6ceab082016-10-28 05:44:03 -0700483 }
484 }
485
ehmaldonado36268652017-01-19 08:27:11 -0800486 rtc_source_set("audio_processing_unittests") {
487 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700488
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100489 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800490 sources = [
491 "aec/echo_cancellation_unittest.cc",
492 "aec/system_delay_unittest.cc",
493 "agc/agc_manager_direct_unittest.cc",
494 "agc/loudness_histogram_unittest.cc",
495 "agc/mock_agc.h",
496 "audio_buffer_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100497 "audio_frame_view_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800498 "beamformer/array_util_unittest.cc",
499 "beamformer/complex_matrix_unittest.cc",
500 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100501 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800502 "beamformer/matrix_unittest.cc",
503 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800504 "config_unittest.cc",
505 "echo_cancellation_impl_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100506 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800507 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200508 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800509 "transient/dyadic_decimator_unittest.cc",
510 "transient/file_utils.cc",
511 "transient/file_utils.h",
512 "transient/file_utils_unittest.cc",
513 "transient/moving_moments_unittest.cc",
514 "transient/transient_detector_unittest.cc",
515 "transient/transient_suppressor_unittest.cc",
516 "transient/wpd_node_unittest.cc",
517 "transient/wpd_tree_unittest.cc",
518 "utility/block_mean_calculator_unittest.cc",
519 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800520 ]
521
522 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100523 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200524 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100525 ":apm_logging",
Alex Loiko153f11e2018-02-16 12:39:00 +0100526 ":audio_frame_view",
ehmaldonado36268652017-01-19 08:27:11 -0800527 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800528 ":audioproc_test_utils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100529 ":file_audio_generator_unittests",
Patrik Höglund62139292017-12-19 16:44:45 +0100530 ":mocks",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100531 "../..:typedefs",
ehmaldonado36268652017-01-19 08:27:11 -0800532 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700533 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700534 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100535 "../../api/audio:aec3_config",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100536 "../../api/audio:aec3_factory",
ehmaldonado36268652017-01-19 08:27:11 -0800537 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100538 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100539 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700540 "../../rtc_base:gtest_prod",
541 "../../rtc_base:protobuf_utils",
542 "../../rtc_base:rtc_base",
543 "../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100544 "../../rtc_base:safe_minmax",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100545 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100546 "../../system_wrappers",
547 "../../system_wrappers:cpu_features_api",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100548 "../../test:fileutils",
ehmaldonado36268652017-01-19 08:27:11 -0800549 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200550 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700551 "aec_dump:mock_aec_dump_unittests",
Alex Loiko1e48e802018-03-28 09:45:29 +0200552 "agc2:adaptive_digital_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100553 "agc2:fixed_digital_unittests",
Alex Loiko4ed47d02018-04-04 15:05:57 +0200554 "agc2:noise_estimator_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700555 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100556 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800557 "//testing/gtest",
558 ]
559
560 defines = []
561
ehmaldonado36268652017-01-19 08:27:11 -0800562 if (rtc_enable_intelligibility_enhancer) {
563 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
564 sources += [
565 "intelligibility/intelligibility_enhancer_unittest.cc",
566 "intelligibility/intelligibility_utils_unittest.cc",
567 ]
568 } else {
569 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
570 }
571
572 if (rtc_prefer_fixed_point) {
573 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
574 } else {
575 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
576 }
577
578 if (rtc_enable_protobuf) {
579 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
580 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800581 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800582 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200583 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800584 ":audioproc_unittest_proto",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200585 "../../api/audio:audio_frame_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700586 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700587 "aec_dump",
588 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800589 ]
590 sources += [
ehmaldonado36268652017-01-19 08:27:11 -0800591 "audio_processing_impl_locking_unittest.cc",
592 "audio_processing_impl_unittest.cc",
593 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800594 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800595 "echo_cancellation_bit_exact_unittest.cc",
596 "echo_control_mobile_unittest.cc",
597 "echo_detector/circular_buffer_unittest.cc",
598 "echo_detector/mean_variance_estimator_unittest.cc",
599 "echo_detector/moving_max_unittest.cc",
600 "echo_detector/normalized_covariance_estimator_unittest.cc",
601 "gain_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800602 "level_estimator_unittest.cc",
603 "low_cut_filter_unittest.cc",
604 "noise_suppression_unittest.cc",
605 "residual_echo_detector_unittest.cc",
606 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800607 "test/debug_dump_replayer.cc",
608 "test/debug_dump_replayer.h",
609 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800610 "test/echo_canceller_test_tools.cc",
611 "test/echo_canceller_test_tools.h",
612 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800613 "test/test_utils.h",
614 "voice_detection_unittest.cc",
615 ]
616 }
617
618 if ((!build_with_chromium || is_win) && is_clang) {
619 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
620 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
621 }
622 }
623
ehmaldonado021eef32017-01-05 07:09:50 -0800624 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800625 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700626
ehmaldonado021eef32017-01-05 07:09:50 -0800627 sources = [
628 "audio_processing_performance_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800629 ]
630 deps = [
631 ":audio_processing",
632 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100633 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700634 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100635 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100636 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100637 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100638 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800639 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700640
ehmaldonado021eef32017-01-05 07:09:50 -0800641 if (rtc_enable_intelligibility_enhancer) {
642 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
643 } else {
644 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
645 }
646 }
647
Sam Zackrisson4d364492018-03-02 16:03:21 +0100648 rtc_source_set("file_audio_generator_unittests") {
649 testonly = true
650
651 sources = [
652 "audio_generator/file_audio_generator_unittest.cc",
653 ]
654
655 deps = [
656 ":audio_generator_factory",
657 ":audio_processing",
658 ":file_audio_generator",
659 "../../rtc_base:rtc_base_approved",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100660 "../../test:fileutils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100661 "../../test:test_support",
662 ]
663 }
664
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200665 rtc_source_set("analog_mic_simulation") {
666 sources = [
667 "test/fake_recording_device.cc",
668 "test/fake_recording_device.h",
669 ]
670 deps = [
671 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200672 "../../api:optional",
673 "../../api/audio:audio_frame_api",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200674 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100675 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200676 "../../rtc_base:rtc_base_approved",
677 ]
678 }
679
ehmaldonado1fd08c12017-01-17 02:37:34 -0800680 if (rtc_enable_protobuf) {
Ivo Creusen8c812f32018-03-09 17:33:04 +0100681 rtc_source_set("audioproc_f_impl") {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800682 testonly = true
683 sources = [
684 "test/aec_dump_based_simulator.cc",
685 "test/aec_dump_based_simulator.h",
686 "test/audio_processing_simulator.cc",
687 "test/audio_processing_simulator.h",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100688 "test/audioproc_float_impl.cc",
689 "test/audioproc_float_impl.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800690 "test/wav_based_simulator.cc",
691 "test/wav_based_simulator.h",
692 ]
peahc3ec1fd2016-08-07 23:19:30 -0700693
ehmaldonado1fd08c12017-01-17 02:37:34 -0800694 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200695 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800696 ":audio_processing",
697 ":audioproc_debug_proto",
698 ":audioproc_protobuf_utils",
699 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700700 "../../api:optional",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100701 "../../api/audio:aec3_factory",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800702 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100703 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700704 "../../rtc_base:protobuf_utils",
705 "../../rtc_base:rtc_base_approved",
Per Åhgrenad09d742018-03-08 07:47:14 +0100706 "../../rtc_base:rtc_json",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700707 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100708 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800709 "../../system_wrappers",
710 "../../system_wrappers:system_wrappers_default",
711 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700712 "aec_dump",
713 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800714 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800715 ]
Ivo Creusen8c812f32018-03-09 17:33:04 +0100716 } # audioproc_f_impl
717 rtc_executable("audioproc_f") {
718 testonly = true
719 sources = [
720 "test/audioproc_float_main.cc",
721 ]
722 deps = [
723 ":audio_processing",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100724 "../../api:audioproc_f_api",
Ivo Creusen8c812f32018-03-09 17:33:04 +0100725 "../../rtc_base:rtc_base_approved",
726 ]
ehmaldonado1fd08c12017-01-17 02:37:34 -0800727 } # audioproc_f
728 }
peahc3ec1fd2016-08-07 23:19:30 -0700729
ehmaldonado38a21322016-09-02 04:10:34 -0700730 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000731 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700732 testonly = true
733 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700734 "test/audio_buffer_tools.cc",
735 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200736 "test/bitexactness_tools.cc",
737 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800738 "test/performance_timer.cc",
739 "test/performance_timer.h",
740 "test/simulator_buffers.cc",
741 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700742 "test/test_utils.cc",
743 "test/test_utils.h",
744 ]
745
kjellanderfb114242016-06-13 00:19:48 -0700746 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800747 ":audio_processing",
kwiberg529662a2017-09-04 05:43:17 -0700748 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700749 "../../api:optional",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200750 "../../api/audio:audio_frame_api",
kjellanderfb114242016-06-13 00:19:48 -0700751 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100752 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700753 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100754 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100755 "../../test:fileutils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200756 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200757 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200758 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700759 ]
760 }
761
ehmaldonado38a21322016-09-02 04:10:34 -0700762 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700763 testonly = true
764 sources = [
765 "transient/file_utils.cc",
766 "transient/file_utils.h",
767 "transient/transient_suppression_test.cc",
768 ]
769 deps = [
770 ":audio_processing",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100771 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800772 "../..:webrtc_common",
773 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700774 "../../rtc_base:rtc_base_approved",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100775 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100776 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100777 "../../system_wrappers:metrics_default",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100778 "../../test:fileutils",
kwiberg7a770e02016-08-25 02:32:43 -0700779 "../../test:test_support",
780 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700781 ]
kwiberg7a770e02016-08-25 02:32:43 -0700782 }
783
ehmaldonado38a21322016-09-02 04:10:34 -0700784 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700785 testonly = true
786 sources = [
787 "transient/click_annotate.cc",
788 "transient/file_utils.cc",
789 "transient/file_utils.h",
790 ]
791 deps = [
792 ":audio_processing",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100793 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800794 "../..:webrtc_common",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100795 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100796 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700797 "../../system_wrappers:metrics_default",
798 ]
799 }
800
ehmaldonado38a21322016-09-02 04:10:34 -0700801 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700802 testonly = true
803 sources = [
804 "beamformer/nonlinear_beamformer_test.cc",
805 ]
806 deps = [
807 ":audio_processing",
808 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800809 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100810 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700811 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700812 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700813 ]
kwiberg7a770e02016-08-25 02:32:43 -0700814 }
815
peah1bcfce52016-08-26 07:16:04 -0700816 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700817 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700818 testonly = true
819 sources = [
820 "intelligibility/test/intelligibility_proc.cc",
821 ]
822 deps = [
823 ":audio_processing",
824 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100825 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700826 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700827 "../../system_wrappers:metrics_default",
828 "../../test:test_support",
829 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700830 ]
kwiberg7a770e02016-08-25 02:32:43 -0700831 }
832 }
833
kjellanderfb114242016-06-13 00:19:48 -0700834 if (rtc_enable_protobuf) {
835 proto_library("audioproc_unittest_proto") {
836 sources = [
837 "test/unittest.proto",
838 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200839 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700840 }
841
kjellanderb62dbbe2016-09-23 00:38:52 -0700842 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700843 sources = [
844 "test/protobuf_utils.cc",
845 "test/protobuf_utils.h",
846 ]
847
848 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700849 ":audioproc_debug_proto",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100850 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800851 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700852 "../../rtc_base:protobuf_utils",
853 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700854 ]
855 }
856 }
857}