blob: 97705c69c591b2f1a41323e10705538a23481203 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00009import("//build/config/arm.gni")
10import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000011import("../../build/webrtc.gni")
12
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000013declare_args() {
14 # Outputs some low-level debug files.
15 aec_debug_dump = false
16
17 # Disables the usual mode where we trust the reported system delay
18 # values the AEC receives. The corresponding define is set appropriately
19 # in the code, but it can be force-enabled here for testing.
20 aec_untrusted_delay_for_testing = false
21}
22
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000023source_set("audio_processing") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000024 sources = [
peah8df5d4f2016-02-23 14:34:59 -080025 "aec/aec_core.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000026 "aec/aec_core.h",
peahe687f782016-05-09 03:57:33 -070027 "aec/aec_core_optimized_methods.h",
peah21a395d2016-04-13 07:53:48 -070028 "aec/aec_rdft.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000029 "aec/aec_rdft.h",
peah88950cf2016-03-04 00:12:40 -080030 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000031 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080032 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010033 "aec/echo_cancellation.h",
peah27045122016-04-10 22:38:14 -070034 "aecm/aecm_core.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000035 "aecm/aecm_core.h",
peah27045122016-04-10 22:38:14 -070036 "aecm/echo_control_mobile.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010037 "aecm/echo_control_mobile.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",
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000043 "agc/legacy/analog_agc.c",
44 "agc/legacy/analog_agc.h",
45 "agc/legacy/digital_agc.c",
46 "agc/legacy/digital_agc.h",
47 "agc/legacy/gain_control.h",
peahbbe42332016-06-08 06:42:02 -070048 "agc/loudness_histogram.cc",
49 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000050 "agc/utility.cc",
51 "agc/utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000052 "audio_buffer.cc",
53 "audio_buffer.h",
aleloi5f099802016-08-25 00:45:31 -070054 "audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000055 "audio_processing_impl.cc",
56 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -070057 "beamformer/array_util.cc",
58 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000059 "beamformer/complex_matrix.h",
60 "beamformer/covariance_matrix_generator.cc",
61 "beamformer/covariance_matrix_generator.h",
62 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000063 "beamformer/nonlinear_beamformer.cc",
64 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000065 "common.h",
66 "echo_cancellation_impl.cc",
67 "echo_cancellation_impl.h",
68 "echo_control_mobile_impl.cc",
69 "echo_control_mobile_impl.h",
peahbe615622016-02-13 16:40:47 -080070 "gain_control_for_experimental_agc.cc",
71 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000072 "gain_control_impl.cc",
73 "gain_control_impl.h",
74 "high_pass_filter_impl.cc",
75 "high_pass_filter_impl.h",
76 "include/audio_processing.h",
peahca4cac72016-06-29 15:26:12 -070077 "level_controller/biquad_filter.cc",
78 "level_controller/biquad_filter.h",
79 "level_controller/down_sampler.cc",
80 "level_controller/down_sampler.h",
81 "level_controller/gain_applier.cc",
82 "level_controller/gain_applier.h",
83 "level_controller/gain_selector.cc",
84 "level_controller/gain_selector.h",
85 "level_controller/lc_constants.h",
86 "level_controller/level_controller.cc",
87 "level_controller/level_controller.h",
88 "level_controller/noise_level_estimator.cc",
89 "level_controller/noise_level_estimator.h",
90 "level_controller/noise_spectrum_estimator.cc",
91 "level_controller/noise_spectrum_estimator.h",
92 "level_controller/peak_level_estimator.cc",
93 "level_controller/peak_level_estimator.h",
94 "level_controller/saturating_gain_estimator.cc",
95 "level_controller/saturating_gain_estimator.h",
96 "level_controller/signal_classifier.cc",
97 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000098 "level_estimator_impl.cc",
99 "level_estimator_impl.h",
peahb46083e2016-05-03 07:01:18 -0700100 "logging/apm_data_dumper.cc",
101 "logging/apm_data_dumper.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000102 "noise_suppression_impl.cc",
103 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800104 "render_queue_item_verifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "rms_level.cc",
106 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000107 "splitting_filter.cc",
108 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700109 "three_band_filter_bank.cc",
110 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000111 "transient/common.h",
112 "transient/daubechies_8_wavelet_coeffs.h",
113 "transient/dyadic_decimator.h",
114 "transient/moving_moments.cc",
115 "transient/moving_moments.h",
116 "transient/transient_detector.cc",
117 "transient/transient_detector.h",
118 "transient/transient_suppressor.cc",
119 "transient/transient_suppressor.h",
120 "transient/wpd_node.cc",
121 "transient/wpd_node.h",
122 "transient/wpd_tree.cc",
123 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000124 "typing_detection.cc",
125 "typing_detection.h",
minyue84db6fa2016-03-24 14:36:25 -0700126 "utility/block_mean_calculator.cc",
127 "utility/block_mean_calculator.h",
peahbdb7af62016-04-12 14:47:40 -0700128 "utility/delay_estimator.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000129 "utility/delay_estimator.h",
130 "utility/delay_estimator_internal.h",
peahbdb7af62016-04-12 14:47:40 -0700131 "utility/delay_estimator_wrapper.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000132 "utility/delay_estimator_wrapper.h",
aluebsecf6b812015-06-25 12:28:48 -0700133 "vad/common.h",
134 "vad/gmm.cc",
135 "vad/gmm.h",
136 "vad/noise_gmm_tables.h",
137 "vad/pitch_based_vad.cc",
138 "vad/pitch_based_vad.h",
139 "vad/pitch_internal.cc",
140 "vad/pitch_internal.h",
141 "vad/pole_zero_filter.cc",
142 "vad/pole_zero_filter.h",
143 "vad/standalone_vad.cc",
144 "vad/standalone_vad.h",
145 "vad/vad_audio_proc.cc",
146 "vad/vad_audio_proc.h",
147 "vad/vad_audio_proc_internal.h",
148 "vad/vad_circular_buffer.cc",
149 "vad/vad_circular_buffer.h",
150 "vad/voice_activity_detector.cc",
151 "vad/voice_activity_detector.h",
152 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000153 "voice_detection_impl.cc",
154 "voice_detection_impl.h",
155 ]
156
brettw@chromium.org87ff9c82014-09-09 23:34:56 +0000157 configs += [ "../..:common_config" ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000158 public_configs = [ "../..:common_inherited_config" ]
brettw@chromium.org87ff9c82014-09-09 23:34:56 +0000159
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000160 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200161 deps = [
162 "../..:webrtc_common",
kwiberg98ab3a42015-09-30 21:54:21 -0700163 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200164 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000165
166 if (aec_debug_dump) {
peahb46083e2016-05-03 07:01:18 -0700167 defines += [ "WEBRTC_AEC_DEBUG_DUMP=1" ]
168 } else {
169 defines += [ "WEBRTC_AEC_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170 }
171
172 if (aec_untrusted_delay_for_testing) {
173 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
174 }
175
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000176 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000177 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
178 deps += [ ":audioproc_debug_proto" ]
179 }
180
peah1bcfce52016-08-26 07:16:04 -0700181 if (rtc_enable_intelligibility_enhancer) {
182 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
183 sources += [
184 "intelligibility/intelligibility_enhancer.cc",
185 "intelligibility/intelligibility_enhancer.h",
186 "intelligibility/intelligibility_utils.cc",
187 "intelligibility/intelligibility_utils.h",
188 ]
189 } else {
190 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
191 }
192
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000193 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000194 defines += [ "WEBRTC_NS_FIXED" ]
195 sources += [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000196 "ns/noise_suppression_x.c",
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100197 "ns/noise_suppression_x.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000198 "ns/nsx_core.c",
199 "ns/nsx_core.h",
200 "ns/nsx_defines.h",
201 ]
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000202 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000203 sources += [ "ns/nsx_core_mips.c" ]
204 } else {
205 sources += [ "ns/nsx_core_c.c" ]
206 }
207 } else {
208 defines += [ "WEBRTC_NS_FLOAT" ]
209 sources += [
210 "ns/defines.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000211 "ns/noise_suppression.c",
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100212 "ns/noise_suppression.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000213 "ns/ns_core.c",
214 "ns/ns_core.h",
215 "ns/windows_private.h",
216 ]
217 }
218
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000219 if (current_cpu == "x86" || current_cpu == "x64") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000220 deps += [ ":audio_processing_sse2" ]
221 }
222
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700223 if (rtc_build_with_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000224 deps += [ ":audio_processing_neon" ]
225 }
226
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000227 if (current_cpu == "mipsel") {
peah27045122016-04-10 22:38:14 -0700228 sources += [ "aecm/aecm_core_mips.cc" ]
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000229 if (mips_float_abi == "hard") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000230 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800231 "aec/aec_core_mips.cc",
peah21a395d2016-04-13 07:53:48 -0700232 "aec/aec_rdft_mips.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000233 ]
234 }
235 } else {
peah27045122016-04-10 22:38:14 -0700236 sources += [ "aecm/aecm_core_c.cc" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000237 }
238
kjellander8f4419b2016-06-02 02:09:52 -0700239 # TODO(jschuh): Bug 1348: fix this warning.
240 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000241
242 if (is_clang) {
kjellanderfb114242016-06-13 00:19:48 -0700243 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000244 configs -= [ "//build/config/clang:find_bad_constructs" ]
245 }
246
247 deps += [
xians@webrtc.orge46bc772014-10-10 08:36:56 +0000248 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000249 "../../common_audio",
250 "../../system_wrappers",
251 ]
252}
253
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000254if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000255 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200256 sources = [
257 "debug.proto",
258 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000259
kjellander78ddd732016-02-09 08:13:06 -0800260 proto_out_dir = "webrtc/modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000261 }
262}
263
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000264if (current_cpu == "x86" || current_cpu == "x64") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000265 source_set("audio_processing_sse2") {
266 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800267 "aec/aec_core_sse2.cc",
peah21a395d2016-04-13 07:53:48 -0700268 "aec/aec_rdft_sse2.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000269 ]
270
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200271 if (is_posix) {
272 cflags = [ "-msse2" ]
273 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000274
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000275 configs += [ "../..:common_config" ]
276 public_configs = [ "../..:common_inherited_config" ]
peahb46083e2016-05-03 07:01:18 -0700277
278 if (aec_debug_dump) {
279 defines = [ "WEBRTC_AEC_DEBUG_DUMP=1" ]
280 } else {
281 defines = [ "WEBRTC_AEC_DEBUG_DUMP=0" ]
282 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000283 }
284}
285
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700286if (rtc_build_with_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000287 source_set("audio_processing_neon") {
288 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800289 "aec/aec_core_neon.cc",
peah21a395d2016-04-13 07:53:48 -0700290 "aec/aec_rdft_neon.cc",
peah27045122016-04-10 22:38:14 -0700291 "aecm/aecm_core_neon.cc",
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000292 "ns/nsx_core_neon.c",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000293 ]
294
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000295 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700296 # Enable compilation for the NEON instruction set. This is needed
297 # since //build/config/arm.gni only enables NEON for iOS, not Android.
298 # This provides the same functionality as webrtc/build/arm_neon.gypi.
299 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200300 cflags = [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000301 }
302
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700303 # Disable LTO on NEON targets due to compiler bug.
304 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000305 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000306 cflags -= [
307 "-flto",
308 "-ffat-lto-objects",
309 ]
310 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700311
312 configs += [ "../..:common_config" ]
313 public_configs = [ "../..:common_inherited_config" ]
314
315 deps = [
316 "../../common_audio",
317 ]
peahb46083e2016-05-03 07:01:18 -0700318
319 if (aec_debug_dump) {
320 defines = [ "WEBRTC_AEC_DEBUG_DUMP=1" ]
321 } else {
322 defines = [ "WEBRTC_AEC_DEBUG_DUMP=0" ]
323 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000324 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000325}
kjellanderfb114242016-06-13 00:19:48 -0700326
327if (rtc_include_tests) {
peahc3ec1fd2016-08-07 23:19:30 -0700328 executable("audioproc") {
329 testonly = true
330 sources = [
331 "test/process_test.cc",
332 ]
333
334 configs += [ "../..:common_config" ]
335 public_configs = [ "../..:common_inherited_config" ]
336
337 if (is_clang) {
338 # Suppress warnings from Chrome's Clang plugins.
339 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
340 configs -= [ "//build/config/clang:find_bad_constructs" ]
341 }
342
343 deps = [
344 ":audio_processing",
345 ":audioproc_debug_proto",
346 ":audioproc_protobuf_utils",
347 ":audioproc_test_utils",
348 "../../system_wrappers",
349 "../../system_wrappers:system_wrappers_default",
350 "../../test:test_support",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700351 "//build/config/sanitizers:deps",
peahc3ec1fd2016-08-07 23:19:30 -0700352 "//testing/gtest",
353 "//third_party/gflags:gflags",
354 ]
355 } # audioproc
356
357 executable("unpack_aecdump") {
358 testonly = true
359 sources = [
360 "test/unpack.cc",
361 ]
362
363 configs += [ "../..:common_config" ]
364 public_configs = [ "../..:common_inherited_config" ]
365
366 if (is_clang) {
367 # Suppress warnings from Chrome's Clang plugins.
368 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
369 configs -= [ "//build/config/clang:find_bad_constructs" ]
370 }
371
372 deps = [
373 ":audio_processing",
374 ":audioproc_debug_proto",
375 ":audioproc_protobuf_utils",
376 ":audioproc_test_utils",
377 "../../common_audio",
378 "../../system_wrappers:system_wrappers_default",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700379 "//build/config/sanitizers:deps",
peahc3ec1fd2016-08-07 23:19:30 -0700380 "//third_party/gflags:gflags",
381 ]
382 } # unpack_aecdump
383
384 executable("audioproc_f") {
385 testonly = true
386 sources = [
387 "test/aec_dump_based_simulator.cc",
388 "test/aec_dump_based_simulator.h",
389 "test/audio_processing_simulator.cc",
390 "test/audio_processing_simulator.h",
391 "test/audioproc_float.cc",
392 "test/wav_based_simulator.cc",
393 "test/wav_based_simulator.h",
394 ]
395
396 configs += [ "../..:common_config" ]
397 public_configs = [ "../..:common_inherited_config" ]
398
399 if (is_clang) {
400 # Suppress warnings from Chrome's Clang plugins.
401 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
402 configs -= [ "//build/config/clang:find_bad_constructs" ]
403 }
404
405 deps = [
406 ":audio_processing",
407 ":audioproc_debug_proto",
408 ":audioproc_protobuf_utils",
409 ":audioproc_test_utils",
410 "../../system_wrappers",
411 "../../system_wrappers:system_wrappers_default",
412 "../../test:test_support",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700413 "//build/config/sanitizers:deps",
peahc3ec1fd2016-08-07 23:19:30 -0700414 "//testing/gtest",
415 "//third_party/gflags:gflags",
416 ]
417 } # audioproc_f
418
kjellanderfb114242016-06-13 00:19:48 -0700419 source_set("audioproc_test_utils") {
420 testonly = true
421 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700422 "test/audio_buffer_tools.cc",
423 "test/audio_buffer_tools.h",
kjellanderfb114242016-06-13 00:19:48 -0700424 "test/test_utils.cc",
425 "test/test_utils.h",
426 ]
427
428 configs += [ "../..:common_config" ]
429 public_configs = [ "../..:common_inherited_config" ]
430
431 if (is_clang) {
432 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
433 configs -= [ "//build/config/clang:find_bad_constructs" ]
434 }
435
436 deps = [
437 "../../base:rtc_base_approved",
438 "../../common_audio",
439 ]
440 }
441
kwiberg7a770e02016-08-25 02:32:43 -0700442 executable("transient_suppression_test") {
443 testonly = true
444 sources = [
445 "transient/file_utils.cc",
446 "transient/file_utils.h",
447 "transient/transient_suppression_test.cc",
448 ]
449 deps = [
450 ":audio_processing",
451 "../../system_wrappers:metrics_default",
452 "../../test:test_support",
453 "//testing/gtest",
454 "//third_party/gflags",
455 ]
456 if (is_clang) {
457 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
458 configs -= [ "//build/config/clang:find_bad_constructs" ]
459 }
460 }
461
462 executable("click_annotate") {
463 testonly = true
464 sources = [
465 "transient/click_annotate.cc",
466 "transient/file_utils.cc",
467 "transient/file_utils.h",
468 ]
469 deps = [
470 ":audio_processing",
471 "../../system_wrappers:metrics_default",
472 ]
473 }
474
475 executable("nonlinear_beamformer_test") {
476 testonly = true
477 sources = [
478 "beamformer/nonlinear_beamformer_test.cc",
479 ]
480 deps = [
481 ":audio_processing",
482 ":audioproc_test_utils",
483 "../../system_wrappers:metrics_default",
484 "//third_party/gflags",
485 ]
486 if (is_clang) {
487 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
488 configs -= [ "//build/config/clang:find_bad_constructs" ]
489 }
490 }
491
peah1bcfce52016-08-26 07:16:04 -0700492 if (rtc_enable_intelligibility_enhancer) {
493 executable("intelligibility_proc") {
494 testonly = true
495 sources = [
496 "intelligibility/test/intelligibility_proc.cc",
497 ]
498 deps = [
499 ":audio_processing",
500 ":audioproc_test_utils",
501 "../../system_wrappers:metrics_default",
502 "../../test:test_support",
503 "//testing/gtest",
504 "//third_party/gflags",
505 ]
506 if (is_clang) {
507 # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163).
508 configs -= [ "//build/config/clang:find_bad_constructs" ]
509 }
kwiberg7a770e02016-08-25 02:32:43 -0700510 }
511 }
512
kjellanderfb114242016-06-13 00:19:48 -0700513 if (rtc_enable_protobuf) {
514 proto_library("audioproc_unittest_proto") {
515 sources = [
516 "test/unittest.proto",
517 ]
518 proto_out_dir = "webrtc/modules/audio_processing"
519 }
520
521 source_set("audioproc_protobuf_utils") {
522 sources = [
523 "test/protobuf_utils.cc",
524 "test/protobuf_utils.h",
525 ]
526
527 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700528 ":audioproc_debug_proto",
kjellanderfb114242016-06-13 00:19:48 -0700529 ]
530 }
531 }
532}