blob: e6c5933f0ddb1c948f6eee122f1d899172c31462 [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",
Alex Loiko1aec5942018-05-15 13:13:22 +020078 "include/aec_dump.cc",
79 "include/aec_dump.h",
peahc19f3122016-10-07 14:54:10 -070080 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000081 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -070082 "include/config.cc",
83 "include/config.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000084 "level_estimator_impl.cc",
85 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -080086 "low_cut_filter.cc",
87 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000088 "noise_suppression_impl.cc",
89 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -080090 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -070091 "residual_echo_detector.cc",
92 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000093 "rms_level.cc",
94 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +000095 "splitting_filter.cc",
96 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -070097 "three_band_filter_bank.cc",
98 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000099 "transient/common.h",
100 "transient/daubechies_8_wavelet_coeffs.h",
101 "transient/dyadic_decimator.h",
102 "transient/moving_moments.cc",
103 "transient/moving_moments.h",
104 "transient/transient_detector.cc",
105 "transient/transient_detector.h",
106 "transient/transient_suppressor.cc",
107 "transient/transient_suppressor.h",
108 "transient/wpd_node.cc",
109 "transient/wpd_node.h",
110 "transient/wpd_tree.cc",
111 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 "typing_detection.cc",
113 "typing_detection.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000114 "voice_detection_impl.cc",
115 "voice_detection_impl.h",
116 ]
117
118 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200119 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100120 ":aec_core",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100121 ":apm_logging",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100122 ":audio_frame_view",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100123 ":audio_generator_interface",
Mirko Bonadei10679932017-12-05 15:07:16 +0100124 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100125 ":audio_processing_statistics",
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",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200131 "../../api/audio:audio_frame_api",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100132 "../../api/audio:echo_control",
aleloi6321b492016-12-05 01:46:09 -0800133 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100134 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100135 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100136 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700137 "../../rtc_base:gtest_prod",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100138 "../../rtc_base:safe_minmax",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100139 "../../rtc_base:sanitizer",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100140 "../../system_wrappers:cpu_features_api",
Per Åhgren11556462017-12-22 16:13:57 +0100141 "../../system_wrappers:field_trial_api",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100142 "../../system_wrappers:metrics_api",
Alex Loiko2bac8962018-03-27 13:38:36 +0200143 "agc2:adaptive_digital",
144 "agc2:fixed_digital",
Alex Loikob5c9a792018-04-16 16:31:22 +0200145 "agc2:gain_applier",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100146 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200147 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149 if (aec_untrusted_delay_for_testing) {
150 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
151 }
152
peah1bcfce52016-08-26 07:16:04 -0700153 if (rtc_enable_intelligibility_enhancer) {
154 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
155 sources += [
156 "intelligibility/intelligibility_enhancer.cc",
157 "intelligibility/intelligibility_enhancer.h",
158 "intelligibility/intelligibility_utils.cc",
159 "intelligibility/intelligibility_utils.h",
160 ]
161 } else {
162 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
163 }
164
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000165 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000166 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000167 } else {
168 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000169 }
170
kjellander8f4419b2016-06-02 02:09:52 -0700171 # TODO(jschuh): Bug 1348: fix this warning.
172 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000173
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000174 deps += [
175 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100176 "../../common_audio:fir_filter",
177 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700178 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000179 "../../system_wrappers",
180 ]
181}
182
Ivo Creusen56d46092017-11-24 17:29:59 +0100183rtc_source_set("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000184 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100185 sources = [
186 "include/audio_processing_statistics.cc",
187 "include/audio_processing_statistics.h",
188 ]
189 deps = [
190 "../../api:optional",
191 ]
192}
193
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100194rtc_source_set("audio_frame_view") {
195 sources = [
196 "include/audio_frame_view.h",
197 ]
198 deps = [
199 "../../api:array_view",
200 ]
201}
202
Sam Zackrisson4d364492018-03-02 16:03:21 +0100203rtc_source_set("audio_generator_interface") {
204 visibility = [ "*" ]
205 sources = [
206 "include/audio_generator.h",
207 ]
208 deps = [
209 ":audio_frame_view",
210 "../../rtc_base:rtc_base_approved",
211 "../../system_wrappers:system_wrappers",
212 ]
213}
214
215rtc_source_set("audio_generator_factory") {
216 visibility = [ "*" ]
217 sources = [
218 "include/audio_generator_factory.cc",
219 "include/audio_generator_factory.h",
220 ]
221 deps = [
222 ":audio_generator_interface",
223 ":file_audio_generator",
224 "../../common_audio:common_audio",
225 "../../rtc_base:rtc_base_approved",
226 "../../system_wrappers:system_wrappers",
227 ]
228}
229
230rtc_source_set("file_audio_generator") {
231 sources = [
232 "audio_generator/file_audio_generator.cc",
233 "audio_generator/file_audio_generator.h",
234 ]
235 deps = [
236 ":audio_generator_interface",
237 "../../common_audio:common_audio",
238 "../../rtc_base:rtc_base_approved",
239 "../../system_wrappers:system_wrappers",
240 ]
241}
242
kjellander7439f972016-12-05 22:47:46 -0800243rtc_source_set("audio_processing_c") {
244 visibility = [ ":*" ] # Only targets in this file can depend on this.
245 sources = [
246 "agc/legacy/analog_agc.c",
247 "agc/legacy/analog_agc.h",
248 "agc/legacy/digital_agc.c",
249 "agc/legacy/digital_agc.h",
250 "agc/legacy/gain_control.h",
251 ]
252
253 if (rtc_prefer_fixed_point) {
254 sources += [
255 "ns/noise_suppression_x.c",
256 "ns/noise_suppression_x.h",
257 "ns/nsx_core.c",
258 "ns/nsx_core.h",
259 "ns/nsx_defines.h",
260 ]
261 if (current_cpu == "mipsel") {
262 sources += [ "ns/nsx_core_mips.c" ]
263 } else {
264 sources += [ "ns/nsx_core_c.c" ]
265 }
266 } else {
267 sources += [
268 "ns/defines.h",
269 "ns/noise_suppression.c",
270 "ns/noise_suppression.h",
271 "ns/ns_core.c",
272 "ns/ns_core.h",
273 "ns/windows_private.h",
274 ]
275 }
276
277 deps = [
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100278 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800279 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800280 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100281 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100282 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700283 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100284 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800285 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800286
287 if (rtc_build_with_neon) {
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100288 sources += [ "ns/nsx_core_neon.c" ]
289
290 if (current_cpu != "arm64") {
291 # Enable compilation for the NEON instruction set. This is needed
292 # since //build/config/arm.gni only enables NEON for iOS, not Android.
293 # This provides the same functionality as webrtc/build/arm_neon.gypi.
294 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
295 cflags = [ "-mfpu=neon" ]
296 }
297
298 # Disable LTO on NEON targets due to compiler bug.
299 # TODO(fdegans): Enable this. See crbug.com/408997.
300 if (rtc_use_lto) {
301 cflags -= [
302 "-flto",
303 "-ffat-lto-objects",
304 ]
305 }
mbonadeie5dc3ce2017-01-25 05:34:46 -0800306 }
kjellander7439f972016-12-05 22:47:46 -0800307}
308
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000309if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000310 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200311 sources = [
312 "debug.proto",
313 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000314
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200315 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000316 }
317}
318
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100319rtc_source_set("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100320 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100321 sources = [
322 "logging/apm_data_dumper.cc",
323 "logging/apm_data_dumper.h",
324 ]
325 deps = [
326 "../../api:array_view",
327 "../../common_audio:common_audio",
328 "../../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100329 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100330 ]
331 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100332}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000333
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100334rtc_source_set("aec_core") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100335 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100336 sources = [
Patrik Höglund62139292017-12-19 16:44:45 +0100337 "aec/aec_common.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100338 "aec/aec_core.cc",
339 "aec/aec_core.h",
340 "aec/aec_core_optimized_methods.h",
341 "aecm/aecm_core.cc",
342 "aecm/aecm_core.h",
Patrik Höglund62139292017-12-19 16:44:45 +0100343 "aecm/aecm_defines.h",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100344 "aecm/echo_control_mobile.cc",
345 "aecm/echo_control_mobile.h",
346 "utility/block_mean_calculator.cc",
347 "utility/block_mean_calculator.h",
348 "utility/delay_estimator.cc",
349 "utility/delay_estimator.h",
350 "utility/delay_estimator_internal.h",
351 "utility/delay_estimator_wrapper.cc",
352 "utility/delay_estimator_wrapper.h",
353 "utility/ooura_fft.cc",
354 "utility/ooura_fft.h",
355 "utility/ooura_fft_tables_common.h",
356 ]
357 deps = [
358 ":apm_logging",
359 ":audio_processing_statistics",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100360 "../..:typedefs",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100361 "../..:webrtc_common",
362 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100363 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100364 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100365 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100366 "../../rtc_base:sanitizer",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100367 "../../system_wrappers:cpu_features_api",
368 "../../system_wrappers:metrics_api",
369 ]
370 cflags = []
371 defines = []
372
373 if (current_cpu == "x86" || current_cpu == "x64") {
374 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800375 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700376 "utility/ooura_fft_sse2.cc",
377 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000378 ]
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -0700379 if (is_posix || is_fuchsia) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100380 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700381 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000382 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000383
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100384 if (rtc_build_with_neon) {
385 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800386 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700387 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700388 "utility/ooura_fft_neon.cc",
389 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000390 ]
391
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000392 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700393 # Enable compilation for the NEON instruction set. This is needed
394 # since //build/config/arm.gni only enables NEON for iOS, not Android.
395 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700396 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100397 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000398 }
399
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700400 # Disable LTO on NEON targets due to compiler bug.
401 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000402 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000403 cflags -= [
404 "-flto",
405 "-ffat-lto-objects",
406 ]
407 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700408
Patrik Höglund67c20ae2017-12-18 11:21:14 +0100409 deps += [ "../../common_audio" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000410 }
kjellander7439f972016-12-05 22:47:46 -0800411
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100412 if (current_cpu == "mipsel") {
413 sources += [ "aecm/aecm_core_mips.cc" ]
414 if (mips_float_abi == "hard") {
415 sources += [
416 "aec/aec_core_mips.cc",
417 "utility/ooura_fft_mips.cc",
418 ]
419 }
420 } else {
421 sources += [ "aecm/aecm_core_c.cc" ]
422 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100423
424 # TODO(jschuh): Bug 1348: fix this warning.
425 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100426}
427
kjellanderfb114242016-06-13 00:19:48 -0700428if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100429 rtc_source_set("mocks") {
430 testonly = true
431 sources = [
432 "include/mock_audio_processing.h",
433 ]
434 deps = [
Patrik Höglund62139292017-12-19 16:44:45 +0100435 ":audio_processing",
436 ":audio_processing_statistics",
437 "../../test:test_support",
438 ]
439 }
440
kjellander6ceab082016-10-28 05:44:03 -0700441 group("audio_processing_tests") {
442 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100443 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700444 ":audioproc_test_utils",
445 ":click_annotate",
446 ":nonlinear_beamformer_test",
447 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700448 ]
449
450 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100451 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700452 }
453
454 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100455 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800456 ":audioproc_f",
457 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200458 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700459 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800460 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800461 ]
kjellander6ceab082016-10-28 05:44:03 -0700462 }
463 }
464
ehmaldonado36268652017-01-19 08:27:11 -0800465 rtc_source_set("audio_processing_unittests") {
466 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700467
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100468 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800469 sources = [
470 "aec/echo_cancellation_unittest.cc",
471 "aec/system_delay_unittest.cc",
472 "agc/agc_manager_direct_unittest.cc",
473 "agc/loudness_histogram_unittest.cc",
474 "agc/mock_agc.h",
475 "audio_buffer_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100476 "audio_frame_view_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800477 "beamformer/array_util_unittest.cc",
478 "beamformer/complex_matrix_unittest.cc",
479 "beamformer/covariance_matrix_generator_unittest.cc",
Patrik Höglund62139292017-12-19 16:44:45 +0100480 "beamformer/matrix_test_helpers.h",
ehmaldonado36268652017-01-19 08:27:11 -0800481 "beamformer/matrix_unittest.cc",
482 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800483 "config_unittest.cc",
484 "echo_cancellation_impl_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100485 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800486 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200487 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800488 "transient/dyadic_decimator_unittest.cc",
489 "transient/file_utils.cc",
490 "transient/file_utils.h",
491 "transient/file_utils_unittest.cc",
492 "transient/moving_moments_unittest.cc",
493 "transient/transient_detector_unittest.cc",
494 "transient/transient_suppressor_unittest.cc",
495 "transient/wpd_node_unittest.cc",
496 "transient/wpd_tree_unittest.cc",
497 "utility/block_mean_calculator_unittest.cc",
498 "utility/delay_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800499 ]
500
501 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100502 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200503 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100504 ":apm_logging",
Alex Loiko153f11e2018-02-16 12:39:00 +0100505 ":audio_frame_view",
ehmaldonado36268652017-01-19 08:27:11 -0800506 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800507 ":audioproc_test_utils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100508 ":file_audio_generator_unittests",
Patrik Höglund62139292017-12-19 16:44:45 +0100509 ":mocks",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100510 "../..:typedefs",
ehmaldonado36268652017-01-19 08:27:11 -0800511 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700512 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700513 "../../api:optional",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100514 "../../api/audio:aec3_config",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100515 "../../api/audio:aec3_factory",
ehmaldonado36268652017-01-19 08:27:11 -0800516 "../../common_audio:common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100517 "../../common_audio:common_audio_c",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100518 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700519 "../../rtc_base:gtest_prod",
520 "../../rtc_base:protobuf_utils",
521 "../../rtc_base:rtc_base",
522 "../../rtc_base:rtc_base_approved",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100523 "../../rtc_base:safe_minmax",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100524 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100525 "../../system_wrappers",
526 "../../system_wrappers:cpu_features_api",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100527 "../../test:fileutils",
ehmaldonado36268652017-01-19 08:27:11 -0800528 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200529 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700530 "aec_dump:mock_aec_dump_unittests",
Alex Loiko1e48e802018-03-28 09:45:29 +0200531 "agc2:adaptive_digital_unittests",
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200532 "agc2:biquad_filter_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100533 "agc2:fixed_digital_unittests",
Alex Loiko4ed47d02018-04-04 15:05:57 +0200534 "agc2:noise_estimator_unittests",
Alessio Bazzica4736d4e2018-04-17 16:46:45 +0200535 "agc2/rnn_vad:unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700536 "test/conversational_speech:unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100537 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800538 "//testing/gtest",
539 ]
540
541 defines = []
542
ehmaldonado36268652017-01-19 08:27:11 -0800543 if (rtc_enable_intelligibility_enhancer) {
544 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
545 sources += [
546 "intelligibility/intelligibility_enhancer_unittest.cc",
547 "intelligibility/intelligibility_utils_unittest.cc",
548 ]
549 } else {
550 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
551 }
552
553 if (rtc_prefer_fixed_point) {
554 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
555 } else {
556 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
557 }
558
559 if (rtc_enable_protobuf) {
560 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
561 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800562 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800563 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200564 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800565 ":audioproc_unittest_proto",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200566 "../../api/audio:audio_frame_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700567 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700568 "aec_dump",
569 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800570 ]
571 sources += [
ehmaldonado36268652017-01-19 08:27:11 -0800572 "audio_processing_impl_locking_unittest.cc",
573 "audio_processing_impl_unittest.cc",
574 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800575 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800576 "echo_cancellation_bit_exact_unittest.cc",
577 "echo_control_mobile_unittest.cc",
578 "echo_detector/circular_buffer_unittest.cc",
579 "echo_detector/mean_variance_estimator_unittest.cc",
580 "echo_detector/moving_max_unittest.cc",
581 "echo_detector/normalized_covariance_estimator_unittest.cc",
582 "gain_control_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800583 "level_estimator_unittest.cc",
584 "low_cut_filter_unittest.cc",
585 "noise_suppression_unittest.cc",
586 "residual_echo_detector_unittest.cc",
587 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800588 "test/debug_dump_replayer.cc",
589 "test/debug_dump_replayer.h",
590 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800591 "test/echo_canceller_test_tools.cc",
592 "test/echo_canceller_test_tools.h",
593 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800594 "test/test_utils.h",
595 "voice_detection_unittest.cc",
596 ]
597 }
598
599 if ((!build_with_chromium || is_win) && is_clang) {
600 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
601 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
602 }
603 }
604
ehmaldonado021eef32017-01-05 07:09:50 -0800605 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800606 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700607
ehmaldonado021eef32017-01-05 07:09:50 -0800608 sources = [
609 "audio_processing_performance_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800610 ]
611 deps = [
612 ":audio_processing",
613 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100614 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700615 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100616 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100617 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100618 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100619 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800620 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700621
ehmaldonado021eef32017-01-05 07:09:50 -0800622 if (rtc_enable_intelligibility_enhancer) {
623 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
624 } else {
625 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
626 }
627 }
628
Sam Zackrisson4d364492018-03-02 16:03:21 +0100629 rtc_source_set("file_audio_generator_unittests") {
630 testonly = true
631
632 sources = [
633 "audio_generator/file_audio_generator_unittest.cc",
634 ]
635
636 deps = [
637 ":audio_generator_factory",
638 ":audio_processing",
639 ":file_audio_generator",
640 "../../rtc_base:rtc_base_approved",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100641 "../../test:fileutils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100642 "../../test:test_support",
643 ]
644 }
645
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200646 rtc_source_set("analog_mic_simulation") {
647 sources = [
648 "test/fake_recording_device.cc",
649 "test/fake_recording_device.h",
650 ]
651 deps = [
652 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200653 "../../api:optional",
654 "../../api/audio:audio_frame_api",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200655 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100656 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200657 "../../rtc_base:rtc_base_approved",
658 ]
659 }
660
ehmaldonado1fd08c12017-01-17 02:37:34 -0800661 if (rtc_enable_protobuf) {
Ivo Creusen8c812f32018-03-09 17:33:04 +0100662 rtc_source_set("audioproc_f_impl") {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800663 testonly = true
664 sources = [
665 "test/aec_dump_based_simulator.cc",
666 "test/aec_dump_based_simulator.h",
667 "test/audio_processing_simulator.cc",
668 "test/audio_processing_simulator.h",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100669 "test/audioproc_float_impl.cc",
670 "test/audioproc_float_impl.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800671 "test/wav_based_simulator.cc",
672 "test/wav_based_simulator.h",
673 ]
peahc3ec1fd2016-08-07 23:19:30 -0700674
ehmaldonado1fd08c12017-01-17 02:37:34 -0800675 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200676 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800677 ":audio_processing",
678 ":audioproc_debug_proto",
679 ":audioproc_protobuf_utils",
680 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700681 "../../api:optional",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100682 "../../api/audio:aec3_factory",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800683 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100684 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700685 "../../rtc_base:protobuf_utils",
686 "../../rtc_base:rtc_base_approved",
Per Åhgrenad09d742018-03-08 07:47:14 +0100687 "../../rtc_base:rtc_json",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700688 "../../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +0100689 "../../rtc_base:stringutils",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800690 "../../system_wrappers",
691 "../../system_wrappers:system_wrappers_default",
692 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700693 "aec_dump",
694 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800695 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800696 ]
Ivo Creusen8c812f32018-03-09 17:33:04 +0100697 } # audioproc_f_impl
698 rtc_executable("audioproc_f") {
699 testonly = true
700 sources = [
701 "test/audioproc_float_main.cc",
702 ]
703 deps = [
704 ":audio_processing",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100705 "../../api:audioproc_f_api",
Ivo Creusen8c812f32018-03-09 17:33:04 +0100706 "../../rtc_base:rtc_base_approved",
707 ]
ehmaldonado1fd08c12017-01-17 02:37:34 -0800708 } # audioproc_f
709 }
peahc3ec1fd2016-08-07 23:19:30 -0700710
ehmaldonado38a21322016-09-02 04:10:34 -0700711 rtc_source_set("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000712 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700713 testonly = true
714 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700715 "test/audio_buffer_tools.cc",
716 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200717 "test/bitexactness_tools.cc",
718 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800719 "test/performance_timer.cc",
720 "test/performance_timer.h",
721 "test/simulator_buffers.cc",
722 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700723 "test/test_utils.cc",
724 "test/test_utils.h",
725 ]
726
kjellanderfb114242016-06-13 00:19:48 -0700727 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800728 ":audio_processing",
kwiberg529662a2017-09-04 05:43:17 -0700729 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700730 "../../api:optional",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200731 "../../api/audio:audio_frame_api",
kjellanderfb114242016-06-13 00:19:48 -0700732 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100733 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700734 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100735 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100736 "../../test:fileutils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200737 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200738 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200739 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700740 ]
741 }
742
ehmaldonado38a21322016-09-02 04:10:34 -0700743 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700744 testonly = true
745 sources = [
746 "transient/file_utils.cc",
747 "transient/file_utils.h",
748 "transient/transient_suppression_test.cc",
749 ]
750 deps = [
751 ":audio_processing",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100752 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800753 "../..:webrtc_common",
754 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700755 "../../rtc_base:rtc_base_approved",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100756 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100757 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100758 "../../system_wrappers:metrics_default",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100759 "../../test:fileutils",
kwiberg7a770e02016-08-25 02:32:43 -0700760 "../../test:test_support",
761 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700762 ]
kwiberg7a770e02016-08-25 02:32:43 -0700763 }
764
ehmaldonado38a21322016-09-02 04:10:34 -0700765 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700766 testonly = true
767 sources = [
768 "transient/click_annotate.cc",
769 "transient/file_utils.cc",
770 "transient/file_utils.h",
771 ]
772 deps = [
773 ":audio_processing",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100774 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800775 "../..:webrtc_common",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100776 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100777 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700778 "../../system_wrappers:metrics_default",
779 ]
780 }
781
ehmaldonado38a21322016-09-02 04:10:34 -0700782 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700783 testonly = true
784 sources = [
785 "beamformer/nonlinear_beamformer_test.cc",
786 ]
787 deps = [
788 ":audio_processing",
789 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800790 "../../common_audio:common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100791 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700792 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700793 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700794 ]
kwiberg7a770e02016-08-25 02:32:43 -0700795 }
796
peah1bcfce52016-08-26 07:16:04 -0700797 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700798 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700799 testonly = true
800 sources = [
801 "intelligibility/test/intelligibility_proc.cc",
802 ]
803 deps = [
804 ":audio_processing",
805 ":audioproc_test_utils",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100806 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700807 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700808 "../../system_wrappers:metrics_default",
809 "../../test:test_support",
810 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700811 ]
kwiberg7a770e02016-08-25 02:32:43 -0700812 }
813 }
814
kjellanderfb114242016-06-13 00:19:48 -0700815 if (rtc_enable_protobuf) {
816 proto_library("audioproc_unittest_proto") {
817 sources = [
818 "test/unittest.proto",
819 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200820 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700821 }
822
kjellanderb62dbbe2016-09-23 00:38:52 -0700823 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700824 sources = [
825 "test/protobuf_utils.cc",
826 "test/protobuf_utils.h",
827 ]
828
829 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700830 ":audioproc_debug_proto",
Gustaf Ullbergf35c6662018-02-23 13:18:29 +0100831 "../..:typedefs",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800832 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700833 "../../rtc_base:protobuf_utils",
834 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700835 ]
836 }
837 }
838}