blob: c05e6eac61c2522503ca5a883e39ebdaa42c46da [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",
mbonadei1140f972017-04-26 03:38:35 -0700125 "..:module_api",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100126 "../..:typedefs",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200127 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700128 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700129 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100130 "../../api/audio:aec3_config",
131 "../../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 Loikoe36e8bb2018-02-16 11:54:07 +0100144 "agc2",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100145 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200146 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000147
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148 if (aec_untrusted_delay_for_testing) {
149 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
150 }
151
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000152 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000153 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
154 deps += [ ":audioproc_debug_proto" ]
155 }
156
peah1bcfce52016-08-26 07:16:04 -0700157 if (rtc_enable_intelligibility_enhancer) {
158 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
159 sources += [
160 "intelligibility/intelligibility_enhancer.cc",
161 "intelligibility/intelligibility_enhancer.h",
162 "intelligibility/intelligibility_utils.cc",
163 "intelligibility/intelligibility_utils.h",
164 ]
165 } else {
166 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
167 }
168
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000169 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000171 } else {
172 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173 }
174
kjellander8f4419b2016-06-02 02:09:52 -0700175 # TODO(jschuh): Bug 1348: fix this warning.
176 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000177
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000178 deps += [
179 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100180 "../../common_audio:fir_filter",
181 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700182 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000183 "../../system_wrappers",
184 ]
185}
186
Ivo Creusen56d46092017-11-24 17:29:59 +0100187rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000188 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100189 sources = [
190 "include/audio_processing_statistics.cc",
191 "include/audio_processing_statistics.h",
192 ]
193 deps = [
194 "../../api:optional",
195 ]
196}
197
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100198rtc_source_set("audio_frame_view") {
199 sources = [
200 "include/audio_frame_view.h",
201 ]
202 deps = [
203 "../../api:array_view",
204 ]
205}
206
aleloi868f32f2017-05-23 07:20:05 -0700207rtc_source_set("aec_dump_interface") {
208 sources = [
209 "include/aec_dump.cc",
210 "include/aec_dump.h",
211 ]
212
213 deps = [
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100214 ":audio_frame_view",
kwiberg529662a2017-09-04 05:43:17 -0700215 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700216 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700217 ]
218}
219
Sam Zackrisson4d364492018-03-02 16:03:21 +0100220rtc_source_set("audio_generator_interface") {
221 visibility = [ "*" ]
222 sources = [
223 "include/audio_generator.h",
224 ]
225 deps = [
226 ":audio_frame_view",
227 "../../rtc_base:rtc_base_approved",
228 "../../system_wrappers:system_wrappers",
229 ]
230}
231
232rtc_source_set("audio_generator_factory") {
233 visibility = [ "*" ]
234 sources = [
235 "include/audio_generator_factory.cc",
236 "include/audio_generator_factory.h",
237 ]
238 deps = [
239 ":audio_generator_interface",
240 ":file_audio_generator",
241 "../../common_audio:common_audio",
242 "../../rtc_base:rtc_base_approved",
243 "../../system_wrappers:system_wrappers",
244 ]
245}
246
247rtc_source_set("file_audio_generator") {
248 sources = [
249 "audio_generator/file_audio_generator.cc",
250 "audio_generator/file_audio_generator.h",
251 ]
252 deps = [
253 ":audio_generator_interface",
254 "../../common_audio:common_audio",
255 "../../rtc_base:rtc_base_approved",
256 "../../system_wrappers:system_wrappers",
257 ]
258}
259
kjellander7439f972016-12-05 22:47:46 -0800260rtc_source_set("audio_processing_c") {
261 visibility = [ ":*" ] # Only targets in this file can depend on this.
262 sources = [
263 "agc/legacy/analog_agc.c",
264 "agc/legacy/analog_agc.h",
265 "agc/legacy/digital_agc.c",
266 "agc/legacy/digital_agc.h",
267 "agc/legacy/gain_control.h",
268 ]
269
270 if (rtc_prefer_fixed_point) {
271 sources += [
272 "ns/noise_suppression_x.c",
273 "ns/noise_suppression_x.h",
274 "ns/nsx_core.c",
275 "ns/nsx_core.h",
276 "ns/nsx_defines.h",
277 ]
278 if (current_cpu == "mipsel") {
279 sources += [ "ns/nsx_core_mips.c" ]
280 } else {
281 sources += [ "ns/nsx_core_c.c" ]
282 }
283 } else {
284 sources += [
285 "ns/defines.h",
286 "ns/noise_suppression.c",
287 "ns/noise_suppression.h",
288 "ns/ns_core.c",
289 "ns/ns_core.h",
290 "ns/windows_private.h",
291 ]
292 }
293
294 deps = [
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100295 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800296 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800297 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100298 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100299 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700300 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100301 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800302 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800303
304 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100305 sources += [ "ns/nsx_core_neon.c" ]
306
307 if (current_cpu != "arm64") {
308 # Enable compilation for the NEON instruction set. This is needed
309 # since //build/config/arm.gni only enables NEON for iOS, not Android.
310 # This provides the same functionality as webrtc/build/arm_neon.gypi.
311 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
312 cflags = [ "-mfpu=neon" ]
313 }
314
315 # Disable LTO on NEON targets due to compiler bug.
316 # TODO(fdegans): Enable this. See crbug.com/408997.
317 if (rtc_use_lto) {
318 cflags -= [
319 "-flto",
320 "-ffat-lto-objects",
321 ]
322 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800323 }
kjellander7439f972016-12-05 22:47:46 -0800324}
325
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000326if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000327 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200328 sources = [
329 "debug.proto",
330 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000331
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200332 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000333 }
334}
335
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100336rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100337 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100338 sources = [
339 "logging/apm_data_dumper.cc",
340 "logging/apm_data_dumper.h",
341 ]
342 deps = [
343 "../../api:array_view",
344 "../../common_audio:common_audio",
345 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100346 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100347 ]
348 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100349}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000350
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100351rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100352 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100353 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100354 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100355 "aec/aec_core.cc",
356 "aec/aec_core.h",
357 "aec/aec_core_optimized_methods.h",
358 "aecm/aecm_core.cc",
359 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100360 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100361 "aecm/echo_control_mobile.cc",
362 "aecm/echo_control_mobile.h",
363 "utility/block_mean_calculator.cc",
364 "utility/block_mean_calculator.h",
365 "utility/delay_estimator.cc",
366 "utility/delay_estimator.h",
367 "utility/delay_estimator_internal.h",
368 "utility/delay_estimator_wrapper.cc",
369 "utility/delay_estimator_wrapper.h",
370 "utility/ooura_fft.cc",
371 "utility/ooura_fft.h",
372 "utility/ooura_fft_tables_common.h",
373 ]
374 deps = [
375 ":apm_logging",
376 ":audio_processing_statistics",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100377 "../..:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100378 "../..:webrtc_common",
379 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100380 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100381 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100382 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100383 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100384 "../../system_wrappers:cpu_features_api",
385 "../../system_wrappers:metrics_api",
386 ]
387 cflags = []
388 defines = []
389
390 if (current_cpu == "x86" || current_cpu == "x64") {
391 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800392 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700393 "utility/ooura_fft_sse2.cc",
394 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000395 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200396 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100397 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700398 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000399 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000400
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100401 if (rtc_build_with_neon) {
402 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800403 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700404 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700405 "utility/ooura_fft_neon.cc",
406 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000407 ]
408
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000409 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700410 # Enable compilation for the NEON instruction set. This is needed
411 # since //build/config/arm.gni only enables NEON for iOS, not Android.
412 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700413 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100414 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000415 }
416
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700417 # Disable LTO on NEON targets due to compiler bug.
418 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000419 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000420 cflags -= [
421 "-flto",
422 "-ffat-lto-objects",
423 ]
424 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700425
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100426 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000427 }
kjellander7439f972016-12-05 22:47:46 -0800428
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100429 if (current_cpu == "mipsel") {
430 sources += [ "aecm/aecm_core_mips.cc" ]
431 if (mips_float_abi == "hard") {
432 sources += [
433 "aec/aec_core_mips.cc",
434 "utility/ooura_fft_mips.cc",
435 ]
436 }
437 } else {
438 sources += [ "aecm/aecm_core_c.cc" ]
439 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100440
441 # TODO(jschuh): Bug 1348: fix this warning.
442 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100443}
444
kjellanderfb114242016-06-13 00:19:48 -0700445if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100446 rtc_source_set("mocks") {
447 testonly = true
448 sources = [
449 "include/mock_audio_processing.h",
450 ]
451 deps = [
452 ":aec_dump_interface",
453 ":audio_processing",
454 ":audio_processing_statistics",
455 "../../test:test_support",
456 ]
457 }
458
kjellander6ceab082016-10-28 05:44:03 -0700459 group("audio_processing_tests") {
460 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100461 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700462 ":audioproc_test_utils",
463 ":click_annotate",
464 ":nonlinear_beamformer_test",
465 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700466 ]
467
468 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100469 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700470 }
471
472 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100473 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800474 ":audioproc_f",
475 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200476 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700477 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800478 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800479 ]
kjellander6ceab082016-10-28 05:44:03 -0700480 }
481 }
482
ehmaldonado36268652017-01-19 08:27:11 -0800483 rtc_source_set("audio_processing_unittests") {
484 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700485
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100486 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800487 sources = [
488 "aec/echo_cancellation_unittest.cc",
489 "aec/system_delay_unittest.cc",
490 "agc/agc_manager_direct_unittest.cc",
491 "agc/loudness_histogram_unittest.cc",
492 "agc/mock_agc.h",
493 "audio_buffer_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100494 "audio_frame_view_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800495 "beamformer/array_util_unittest.cc",
496 "beamformer/complex_matrix_unittest.cc",
497 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100498 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800499 "beamformer/matrix_unittest.cc",
500 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800501 "config_unittest.cc",
502 "echo_cancellation_impl_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100503 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800504 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200505 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800506 "transient/dyadic_decimator_unittest.cc",
507 "transient/file_utils.cc",
508 "transient/file_utils.h",
509 "transient/file_utils_unittest.cc",
510 "transient/moving_moments_unittest.cc",
511 "transient/transient_detector_unittest.cc",
512 "transient/transient_suppressor_unittest.cc",
513 "transient/wpd_node_unittest.cc",
514 "transient/wpd_tree_unittest.cc",
515 "utility/block_mean_calculator_unittest.cc",
516 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800517 ]
518
519 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100520 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200521 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100522 ":apm_logging",
Alex Loiko153f11e2018-02-16 12:39:00 +0100523 ":audio_frame_view",
ehmaldonado36268652017-01-19 08:27:11 -0800524 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800525 ":audioproc_test_utils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100526 ":file_audio_generator_unittests",
Patrik Höglund62139292017-12-19 16:44:45 +0100527 ":mocks",
mbonadei1140f972017-04-26 03:38:35 -0700528 "..:module_api",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100529 "../..:typedefs",
ehmaldonado36268652017-01-19 08:27:11 -0800530 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700531 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700532 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100533 "../../api/audio:aec3_config",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100534 "../../api/audio:aec3_factory",
ehmaldonado36268652017-01-19 08:27:11 -0800535 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100536 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100537 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700538 "../../rtc_base:gtest_prod",
539 "../../rtc_base:protobuf_utils",
540 "../../rtc_base:rtc_base",
541 "../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100542 "../../rtc_base:safe_minmax",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100543 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100544 "../../system_wrappers",
545 "../../system_wrappers:cpu_features_api",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100546 "../../test:fileutils",
ehmaldonado36268652017-01-19 08:27:11 -0800547 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200548 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700549 "aec_dump:mock_aec_dump_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100550 "agc2:fixed_digital_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700551 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100552 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800553 "//testing/gtest",
554 ]
555
556 defines = []
557
ehmaldonado36268652017-01-19 08:27:11 -0800558 if (rtc_enable_intelligibility_enhancer) {
559 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
560 sources += [
561 "intelligibility/intelligibility_enhancer_unittest.cc",
562 "intelligibility/intelligibility_utils_unittest.cc",
563 ]
564 } else {
565 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
566 }
567
568 if (rtc_prefer_fixed_point) {
569 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
570 } else {
571 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
572 }
573
574 if (rtc_enable_protobuf) {
575 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
576 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800577 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800578 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200579 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800580 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700581 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700582 "aec_dump",
583 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800584 ]
585 sources += [
ehmaldonado36268652017-01-19 08:27:11 -0800586 "audio_processing_impl_locking_unittest.cc",
587 "audio_processing_impl_unittest.cc",
588 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800589 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800590 "echo_cancellation_bit_exact_unittest.cc",
591 "echo_control_mobile_unittest.cc",
592 "echo_detector/circular_buffer_unittest.cc",
593 "echo_detector/mean_variance_estimator_unittest.cc",
594 "echo_detector/moving_max_unittest.cc",
595 "echo_detector/normalized_covariance_estimator_unittest.cc",
596 "gain_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800597 "level_estimator_unittest.cc",
598 "low_cut_filter_unittest.cc",
599 "noise_suppression_unittest.cc",
600 "residual_echo_detector_unittest.cc",
601 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800602 "test/debug_dump_replayer.cc",
603 "test/debug_dump_replayer.h",
604 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800605 "test/echo_canceller_test_tools.cc",
606 "test/echo_canceller_test_tools.h",
607 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800608 "test/test_utils.h",
609 "voice_detection_unittest.cc",
610 ]
611 }
612
613 if ((!build_with_chromium || is_win) && is_clang) {
614 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
615 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
616 }
617 }
618
ehmaldonado021eef32017-01-05 07:09:50 -0800619 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800620 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700621
ehmaldonado021eef32017-01-05 07:09:50 -0800622 sources = [
623 "audio_processing_performance_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800624 ]
625 deps = [
626 ":audio_processing",
627 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100628 "../../api:array_view",
629 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700630 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100631 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100632 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100633 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100634 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800635 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700636
ehmaldonado021eef32017-01-05 07:09:50 -0800637 if (rtc_enable_intelligibility_enhancer) {
638 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
639 } else {
640 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
641 }
642 }
643
Sam Zackrisson4d364492018-03-02 16:03:21 +0100644 rtc_source_set("file_audio_generator_unittests") {
645 testonly = true
646
647 sources = [
648 "audio_generator/file_audio_generator_unittest.cc",
649 ]
650
651 deps = [
652 ":audio_generator_factory",
653 ":audio_processing",
654 ":file_audio_generator",
655 "../../rtc_base:rtc_base_approved",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100656 "../../test:fileutils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100657 "../../test:test_support",
658 ]
659 }
660
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200661 rtc_source_set("analog_mic_simulation") {
662 sources = [
663 "test/fake_recording_device.cc",
664 "test/fake_recording_device.h",
665 ]
666 deps = [
667 "../../api:array_view",
668 "../../common_audio:common_audio",
669 "../../modules:module_api",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100670 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200671 "../../rtc_base:rtc_base_approved",
672 ]
673 }
674
ehmaldonado1fd08c12017-01-17 02:37:34 -0800675 if (rtc_enable_protobuf) {
Ivo Creusen8c812f32018-03-09 17:33:04 +0100676 rtc_source_set("audioproc_f_impl") {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800677 testonly = true
678 sources = [
679 "test/aec_dump_based_simulator.cc",
680 "test/aec_dump_based_simulator.h",
681 "test/audio_processing_simulator.cc",
682 "test/audio_processing_simulator.h",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100683 "test/audioproc_float_impl.cc",
684 "test/audioproc_float_impl.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800685 "test/wav_based_simulator.cc",
686 "test/wav_based_simulator.h",
687 ]
peahc3ec1fd2016-08-07 23:19:30 -0700688
ehmaldonado1fd08c12017-01-17 02:37:34 -0800689 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200690 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800691 ":audio_processing",
692 ":audioproc_debug_proto",
693 ":audioproc_protobuf_utils",
694 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700695 "../../api:optional",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100696 "../../api/audio:aec3_factory",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800697 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100698 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700699 "../../rtc_base:protobuf_utils",
700 "../../rtc_base:rtc_base_approved",
Per Åhgrenad09d742018-03-08 07:47:14 +0100701 "../../rtc_base:rtc_json",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700702 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100703 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800704 "../../system_wrappers",
705 "../../system_wrappers:system_wrappers_default",
706 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700707 "aec_dump",
708 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800709 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800710 ]
Ivo Creusen8c812f32018-03-09 17:33:04 +0100711 } # audioproc_f_impl
712 rtc_executable("audioproc_f") {
713 testonly = true
714 sources = [
715 "test/audioproc_float_main.cc",
716 ]
717 deps = [
718 ":audio_processing",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100719 "../../api:audioproc_f_api",
Ivo Creusen8c812f32018-03-09 17:33:04 +0100720 "../../rtc_base:rtc_base_approved",
721 ]
ehmaldonado1fd08c12017-01-17 02:37:34 -0800722 } # audioproc_f
723 }
peahc3ec1fd2016-08-07 23:19:30 -0700724
ehmaldonado38a21322016-09-02 04:10:34 -0700725 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000726 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700727 testonly = true
728 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700729 "test/audio_buffer_tools.cc",
730 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200731 "test/bitexactness_tools.cc",
732 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800733 "test/performance_timer.cc",
734 "test/performance_timer.h",
735 "test/simulator_buffers.cc",
736 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700737 "test/test_utils.cc",
738 "test/test_utils.h",
739 ]
740
kjellanderfb114242016-06-13 00:19:48 -0700741 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800742 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700743 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700744 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700745 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700746 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100747 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700748 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100749 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100750 "../../test:fileutils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200751 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200752 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200753 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700754 ]
755 }
756
ehmaldonado38a21322016-09-02 04:10:34 -0700757 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700758 testonly = true
759 sources = [
760 "transient/file_utils.cc",
761 "transient/file_utils.h",
762 "transient/transient_suppression_test.cc",
763 ]
764 deps = [
765 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700766 "..:module_api",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100767 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800768 "../..:webrtc_common",
769 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700770 "../../rtc_base:rtc_base_approved",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100771 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100772 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100773 "../../system_wrappers:metrics_default",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100774 "../../test:fileutils",
kwiberg7a770e02016-08-25 02:32:43 -0700775 "../../test:test_support",
776 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700777 ]
kwiberg7a770e02016-08-25 02:32:43 -0700778 }
779
ehmaldonado38a21322016-09-02 04:10:34 -0700780 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700781 testonly = true
782 sources = [
783 "transient/click_annotate.cc",
784 "transient/file_utils.cc",
785 "transient/file_utils.h",
786 ]
787 deps = [
788 ":audio_processing",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100789 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800790 "../..:webrtc_common",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100791 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100792 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700793 "../../system_wrappers:metrics_default",
794 ]
795 }
796
ehmaldonado38a21322016-09-02 04:10:34 -0700797 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700798 testonly = true
799 sources = [
800 "beamformer/nonlinear_beamformer_test.cc",
801 ]
802 deps = [
803 ":audio_processing",
804 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800805 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100806 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700807 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700808 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700809 ]
kwiberg7a770e02016-08-25 02:32:43 -0700810 }
811
peah1bcfce52016-08-26 07:16:04 -0700812 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700813 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700814 testonly = true
815 sources = [
816 "intelligibility/test/intelligibility_proc.cc",
817 ]
818 deps = [
819 ":audio_processing",
820 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100821 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700822 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700823 "../../system_wrappers:metrics_default",
824 "../../test:test_support",
825 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700826 ]
kwiberg7a770e02016-08-25 02:32:43 -0700827 }
828 }
829
kjellanderfb114242016-06-13 00:19:48 -0700830 if (rtc_enable_protobuf) {
831 proto_library("audioproc_unittest_proto") {
832 sources = [
833 "test/unittest.proto",
834 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200835 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700836 }
837
kjellanderb62dbbe2016-09-23 00:38:52 -0700838 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700839 sources = [
840 "test/protobuf_utils.cc",
841 "test/protobuf_utils.h",
842 ]
843
844 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700845 ":audioproc_debug_proto",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100846 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800847 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700848 "../../rtc_base:protobuf_utils",
849 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700850 ]
851 }
852 }
853}