blob: 9ea74b84fca1bba2f2715c80e22030232b853059 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +00009import("//build/config/arm.gni")
10import("//third_party/protobuf/proto_library.gni")
mbonadei9aa3f0a2017-01-24 06:58:22 -080011import("../../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000013declare_args() {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000014 # Disables the usual mode where we trust the reported system delay
15 # values the AEC receives. The corresponding define is set appropriately
16 # in the code, but it can be force-enabled here for testing.
17 aec_untrusted_delay_for_testing = false
18}
19
kjellanderb62dbbe2016-09-23 00:38:52 -070020rtc_static_library("audio_processing") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000021 sources = [
peah88950cf2016-03-04 00:12:40 -080022 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000023 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080024 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010025 "aec/echo_cancellation.h",
peah522d71b2017-02-23 05:16:26 -080026 "aec3/adaptive_fir_filter.cc",
27 "aec3/adaptive_fir_filter.h",
28 "aec3/aec3_common.cc",
29 "aec3/aec3_common.h",
30 "aec3/aec3_fft.cc",
31 "aec3/aec3_fft.h",
32 "aec3/aec_state.cc",
33 "aec3/aec_state.h",
peahd0263542017-01-03 04:20:34 -080034 "aec3/block_framer.cc",
35 "aec3/block_framer.h",
36 "aec3/block_processor.cc",
37 "aec3/block_processor.h",
peahe985b3f2017-02-28 22:08:53 -080038 "aec3/block_processor_metrics.cc",
39 "aec3/block_processor_metrics.h",
peahd0263542017-01-03 04:20:34 -080040 "aec3/cascaded_biquad_filter.cc",
41 "aec3/cascaded_biquad_filter.h",
peah522d71b2017-02-23 05:16:26 -080042 "aec3/comfort_noise_generator.cc",
43 "aec3/comfort_noise_generator.h",
Per Åhgren38e2d952017-11-17 14:54:28 +010044 "aec3/decimator.cc",
45 "aec3/decimator.h",
peahcf02cf12017-04-05 14:18:07 -070046 "aec3/downsampled_render_buffer.cc",
47 "aec3/downsampled_render_buffer.h",
peahe0eae3c2016-12-14 01:16:23 -080048 "aec3/echo_canceller3.cc",
49 "aec3/echo_canceller3.h",
peah69221db2017-01-27 03:28:19 -080050 "aec3/echo_path_delay_estimator.cc",
51 "aec3/echo_path_delay_estimator.h",
peah522d71b2017-02-23 05:16:26 -080052 "aec3/echo_path_variability.cc",
peah69221db2017-01-27 03:28:19 -080053 "aec3/echo_path_variability.h",
54 "aec3/echo_remover.cc",
55 "aec3/echo_remover.h",
peahe985b3f2017-02-28 22:08:53 -080056 "aec3/echo_remover_metrics.cc",
57 "aec3/echo_remover_metrics.h",
peah522d71b2017-02-23 05:16:26 -080058 "aec3/erl_estimator.cc",
59 "aec3/erl_estimator.h",
60 "aec3/erle_estimator.cc",
61 "aec3/erle_estimator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010062 "aec3/fft_buffer.cc",
63 "aec3/fft_buffer.h",
peah522d71b2017-02-23 05:16:26 -080064 "aec3/fft_data.h",
peahd0263542017-01-03 04:20:34 -080065 "aec3/frame_blocker.cc",
66 "aec3/frame_blocker.h",
peah522d71b2017-02-23 05:16:26 -080067 "aec3/main_filter_update_gain.cc",
68 "aec3/main_filter_update_gain.h",
peah21920892017-02-08 05:08:56 -080069 "aec3/matched_filter.cc",
70 "aec3/matched_filter.h",
71 "aec3/matched_filter_lag_aggregator.cc",
72 "aec3/matched_filter_lag_aggregator.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010073 "aec3/matrix_buffer.cc",
74 "aec3/matrix_buffer.h",
peah522d71b2017-02-23 05:16:26 -080075 "aec3/output_selector.cc",
76 "aec3/output_selector.h",
peahcf02cf12017-04-05 14:18:07 -070077 "aec3/render_buffer.cc",
78 "aec3/render_buffer.h",
peah69221db2017-01-27 03:28:19 -080079 "aec3/render_delay_buffer.cc",
80 "aec3/render_delay_buffer.h",
81 "aec3/render_delay_controller.cc",
82 "aec3/render_delay_controller.h",
peahe985b3f2017-02-28 22:08:53 -080083 "aec3/render_delay_controller_metrics.cc",
84 "aec3/render_delay_controller_metrics.h",
peah522d71b2017-02-23 05:16:26 -080085 "aec3/render_signal_analyzer.cc",
86 "aec3/render_signal_analyzer.h",
87 "aec3/residual_echo_estimator.cc",
88 "aec3/residual_echo_estimator.h",
89 "aec3/shadow_filter_update_gain.cc",
90 "aec3/shadow_filter_update_gain.h",
91 "aec3/subtractor.cc",
92 "aec3/subtractor.h",
93 "aec3/subtractor_output.h",
94 "aec3/suppression_filter.cc",
95 "aec3/suppression_filter.h",
96 "aec3/suppression_gain.cc",
97 "aec3/suppression_gain.h",
Per Åhgren8ba58612017-12-01 23:01:44 +010098 "aec3/vector_buffer.cc",
99 "aec3/vector_buffer.h",
peah5e79b292017-04-12 01:20:45 -0700100 "aec3/vector_math.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000101 "agc/agc.cc",
102 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000103 "agc/agc_manager_direct.cc",
104 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000105 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700106 "agc/loudness_histogram.cc",
107 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000108 "agc/utility.cc",
109 "agc/utility.h",
alessiob3ec96df2017-05-22 06:57:06 -0700110 "agc2/gain_controller2.cc",
111 "agc2/gain_controller2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 "audio_buffer.cc",
113 "audio_buffer.h",
114 "audio_processing_impl.cc",
115 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700116 "beamformer/array_util.cc",
117 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000118 "beamformer/complex_matrix.h",
119 "beamformer/covariance_matrix_generator.cc",
120 "beamformer/covariance_matrix_generator.h",
121 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000122 "beamformer/nonlinear_beamformer.cc",
123 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000124 "common.h",
125 "echo_cancellation_impl.cc",
126 "echo_cancellation_impl.h",
127 "echo_control_mobile_impl.cc",
128 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700129 "echo_detector/circular_buffer.cc",
130 "echo_detector/circular_buffer.h",
131 "echo_detector/mean_variance_estimator.cc",
132 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800133 "echo_detector/moving_max.cc",
134 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700135 "echo_detector/normalized_covariance_estimator.cc",
136 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800137 "gain_control_for_experimental_agc.cc",
138 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000139 "gain_control_impl.cc",
140 "gain_control_impl.h",
peahc19f3122016-10-07 14:54:10 -0700141 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000142 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700143 "include/config.cc",
144 "include/config.h",
peahca4cac72016-06-29 15:26:12 -0700145 "level_controller/biquad_filter.cc",
146 "level_controller/biquad_filter.h",
147 "level_controller/down_sampler.cc",
148 "level_controller/down_sampler.h",
149 "level_controller/gain_applier.cc",
150 "level_controller/gain_applier.h",
151 "level_controller/gain_selector.cc",
152 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700153 "level_controller/level_controller.cc",
154 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700155 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700156 "level_controller/noise_level_estimator.cc",
157 "level_controller/noise_level_estimator.h",
158 "level_controller/noise_spectrum_estimator.cc",
159 "level_controller/noise_spectrum_estimator.h",
160 "level_controller/peak_level_estimator.cc",
161 "level_controller/peak_level_estimator.h",
162 "level_controller/saturating_gain_estimator.cc",
163 "level_controller/saturating_gain_estimator.h",
164 "level_controller/signal_classifier.cc",
165 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000166 "level_estimator_impl.cc",
167 "level_estimator_impl.h",
peah8271d042016-11-22 07:24:52 -0800168 "low_cut_filter.cc",
169 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000170 "noise_suppression_impl.cc",
171 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800172 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700173 "residual_echo_detector.cc",
174 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000175 "rms_level.cc",
176 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000177 "splitting_filter.cc",
178 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700179 "three_band_filter_bank.cc",
180 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000181 "transient/common.h",
182 "transient/daubechies_8_wavelet_coeffs.h",
183 "transient/dyadic_decimator.h",
184 "transient/moving_moments.cc",
185 "transient/moving_moments.h",
186 "transient/transient_detector.cc",
187 "transient/transient_detector.h",
188 "transient/transient_suppressor.cc",
189 "transient/transient_suppressor.h",
190 "transient/wpd_node.cc",
191 "transient/wpd_node.h",
192 "transient/wpd_tree.cc",
193 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000194 "typing_detection.cc",
195 "typing_detection.h",
aluebsecf6b812015-06-25 12:28:48 -0700196 "vad/common.h",
197 "vad/gmm.cc",
198 "vad/gmm.h",
199 "vad/noise_gmm_tables.h",
200 "vad/pitch_based_vad.cc",
201 "vad/pitch_based_vad.h",
202 "vad/pitch_internal.cc",
203 "vad/pitch_internal.h",
204 "vad/pole_zero_filter.cc",
205 "vad/pole_zero_filter.h",
206 "vad/standalone_vad.cc",
207 "vad/standalone_vad.h",
208 "vad/vad_audio_proc.cc",
209 "vad/vad_audio_proc.h",
210 "vad/vad_audio_proc_internal.h",
211 "vad/vad_circular_buffer.cc",
212 "vad/vad_circular_buffer.h",
213 "vad/voice_activity_detector.cc",
214 "vad/voice_activity_detector.h",
215 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000216 "voice_detection_impl.cc",
217 "voice_detection_impl.h",
218 ]
219
220 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200221 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100222 ":aec_core",
aleloi868f32f2017-05-23 07:20:05 -0700223 ":aec_dump_interface",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100224 ":apm_logging",
Mirko Bonadei10679932017-12-05 15:07:16 +0100225 ":audio_processing_c",
Ivo Creusen56d46092017-11-24 17:29:59 +0100226 ":audio_processing_statistics",
mbonadei1140f972017-04-26 03:38:35 -0700227 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200228 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700229 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700230 "../../api:optional",
aleloi6321b492016-12-05 01:46:09 -0800231 "../../audio/utility:audio_frame_operations",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700232 "../../rtc_base:gtest_prod",
233 "../../rtc_base:protobuf_utils",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100234 "../../system_wrappers:cpu_features_api",
235 "../../system_wrappers:metrics_api",
kwiberg98ab3a42015-09-30 21:54:21 -0700236 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200237 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000238
peahf28a3892016-09-01 08:58:21 -0700239 if (apm_debug_dump) {
240 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700241 } else {
peahf28a3892016-09-01 08:58:21 -0700242 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000243 }
244
245 if (aec_untrusted_delay_for_testing) {
246 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
247 }
248
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000249 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000250 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
251 deps += [ ":audioproc_debug_proto" ]
252 }
253
peah1bcfce52016-08-26 07:16:04 -0700254 if (rtc_enable_intelligibility_enhancer) {
255 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
256 sources += [
257 "intelligibility/intelligibility_enhancer.cc",
258 "intelligibility/intelligibility_enhancer.h",
259 "intelligibility/intelligibility_utils.cc",
260 "intelligibility/intelligibility_utils.h",
261 ]
262 } else {
263 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
264 }
265
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000266 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000267 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000268 } else {
269 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000270 }
271
kjellander8f4419b2016-06-02 02:09:52 -0700272 # TODO(jschuh): Bug 1348: fix this warning.
273 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000274
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000275 deps += [
276 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100277 "../../common_audio:fir_filter",
278 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700279 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000280 "../../system_wrappers",
281 ]
282}
283
Ivo Creusen56d46092017-11-24 17:29:59 +0100284rtc_source_set("audio_processing_statistics") {
285 sources = [
286 "include/audio_processing_statistics.cc",
287 "include/audio_processing_statistics.h",
288 ]
289 deps = [
290 "../../api:optional",
291 ]
292}
293
aleloi868f32f2017-05-23 07:20:05 -0700294rtc_source_set("aec_dump_interface") {
295 sources = [
296 "include/aec_dump.cc",
297 "include/aec_dump.h",
298 ]
299
300 deps = [
kwiberg529662a2017-09-04 05:43:17 -0700301 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700302 "../../rtc_base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700303 ]
304}
305
kjellander7439f972016-12-05 22:47:46 -0800306rtc_source_set("audio_processing_c") {
307 visibility = [ ":*" ] # Only targets in this file can depend on this.
308 sources = [
309 "agc/legacy/analog_agc.c",
310 "agc/legacy/analog_agc.h",
311 "agc/legacy/digital_agc.c",
312 "agc/legacy/digital_agc.h",
313 "agc/legacy/gain_control.h",
314 ]
315
316 if (rtc_prefer_fixed_point) {
317 sources += [
318 "ns/noise_suppression_x.c",
319 "ns/noise_suppression_x.h",
320 "ns/nsx_core.c",
321 "ns/nsx_core.h",
322 "ns/nsx_defines.h",
323 ]
324 if (current_cpu == "mipsel") {
325 sources += [ "ns/nsx_core_mips.c" ]
326 } else {
327 sources += [ "ns/nsx_core_c.c" ]
328 }
329 } else {
330 sources += [
331 "ns/defines.h",
332 "ns/noise_suppression.c",
333 "ns/noise_suppression.h",
334 "ns/ns_core.c",
335 "ns/ns_core.h",
336 "ns/windows_private.h",
337 ]
338 }
339
340 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800341 "../..:webrtc_common",
kjellander7439f972016-12-05 22:47:46 -0800342 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700343 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100344 "../../system_wrappers:cpu_features_api",
kjellander7439f972016-12-05 22:47:46 -0800345 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800346
347 if (rtc_build_with_neon) {
348 deps += [ ":audio_processing_neon_c" ]
349 }
kjellander7439f972016-12-05 22:47:46 -0800350}
351
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000352if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000353 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200354 sources = [
355 "debug.proto",
356 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000357
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200358 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000359 }
360}
361
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100362rtc_source_set("apm_logging") {
363 sources = [
364 "logging/apm_data_dumper.cc",
365 "logging/apm_data_dumper.h",
366 ]
367 deps = [
368 "../../api:array_view",
369 "../../common_audio:common_audio",
370 "../../rtc_base:rtc_base_approved",
371 ]
372 defines = []
373 if (apm_debug_dump) {
374 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
375 } else {
376 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
377 }
378}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000379
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100380rtc_source_set("aec_core") {
381 sources = [
382 "aec/aec_core.cc",
383 "aec/aec_core.h",
384 "aec/aec_core_optimized_methods.h",
385 "aecm/aecm_core.cc",
386 "aecm/aecm_core.h",
387 "aecm/echo_control_mobile.cc",
388 "aecm/echo_control_mobile.h",
389 "utility/block_mean_calculator.cc",
390 "utility/block_mean_calculator.h",
391 "utility/delay_estimator.cc",
392 "utility/delay_estimator.h",
393 "utility/delay_estimator_internal.h",
394 "utility/delay_estimator_wrapper.cc",
395 "utility/delay_estimator_wrapper.h",
396 "utility/ooura_fft.cc",
397 "utility/ooura_fft.h",
398 "utility/ooura_fft_tables_common.h",
399 ]
400 deps = [
401 ":apm_logging",
402 ":audio_processing_statistics",
403 "../..:webrtc_common",
404 "../../common_audio:common_audio",
405 "../../rtc_base:rtc_base_approved",
406 "../../system_wrappers:cpu_features_api",
407 "../../system_wrappers:metrics_api",
408 ]
409 cflags = []
410 defines = []
411
412 if (current_cpu == "x86" || current_cpu == "x64") {
413 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800414 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700415 "utility/ooura_fft_sse2.cc",
416 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000417 ]
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200418 if (is_posix) {
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100419 cflags += [ "-msse2" ]
peahb46083e2016-05-03 07:01:18 -0700420 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000421 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000422
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100423 if (rtc_build_with_neon) {
424 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800425 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700426 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700427 "utility/ooura_fft_neon.cc",
428 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000429 ]
430
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000431 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700432 # Enable compilation for the NEON instruction set. This is needed
433 # since //build/config/arm.gni only enables NEON for iOS, not Android.
434 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700435 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100436 cflags += [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000437 }
438
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700439 # Disable LTO on NEON targets due to compiler bug.
440 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000441 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000442 cflags -= [
443 "-flto",
444 "-ffat-lto-objects",
445 ]
446 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700447
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100448 deps += [
kjellander7439f972016-12-05 22:47:46 -0800449 ":audio_processing_neon_c",
Mirko Bonadei10679932017-12-05 15:07:16 +0100450 "../../common_audio",
kjellander7439f972016-12-05 22:47:46 -0800451 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000452 }
kjellander7439f972016-12-05 22:47:46 -0800453
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100454 if (current_cpu == "mipsel") {
455 sources += [ "aecm/aecm_core_mips.cc" ]
456 if (mips_float_abi == "hard") {
457 sources += [
458 "aec/aec_core_mips.cc",
459 "utility/ooura_fft_mips.cc",
460 ]
461 }
462 } else {
463 sources += [ "aecm/aecm_core_c.cc" ]
464 }
465 if (apm_debug_dump) {
466 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
467 } else {
468 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
469 }
Patrik Höglundf39659c2017-12-12 11:16:05 +0100470
471 # TODO(jschuh): Bug 1348: fix this warning.
472 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100473}
474
475if (rtc_build_with_neon) {
kjellander7439f972016-12-05 22:47:46 -0800476 rtc_static_library("audio_processing_neon_c") {
mbonadeie5dc3ce2017-01-25 05:34:46 -0800477 # TODO(mbonadei): Remove (bugs.webrtc.org/6828)
478 # Errors on cyclic dependency with :audio_processing_c if enabled.
479 check_includes = false
480
kjellander7439f972016-12-05 22:47:46 -0800481 sources = [
482 "ns/nsx_core_neon.c",
483 ]
484
485 if (current_cpu != "arm64") {
486 # Enable compilation for the NEON instruction set. This is needed
487 # since //build/config/arm.gni only enables NEON for iOS, not Android.
488 # This provides the same functionality as webrtc/build/arm_neon.gypi.
489 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
490 cflags = [ "-mfpu=neon" ]
491 }
492
493 # Disable LTO on NEON targets due to compiler bug.
494 # TODO(fdegans): Enable this. See crbug.com/408997.
495 if (rtc_use_lto) {
496 cflags -= [
497 "-flto",
498 "-ffat-lto-objects",
499 ]
500 }
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800501 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700502 "../../rtc_base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800503 ]
kjellander7439f972016-12-05 22:47:46 -0800504 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000505}
kjellanderfb114242016-06-13 00:19:48 -0700506
507if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -0700508 group("audio_processing_tests") {
509 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100510 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700511 ":audioproc_test_utils",
512 ":click_annotate",
513 ":nonlinear_beamformer_test",
514 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700515 ]
516
517 if (rtc_enable_intelligibility_enhancer) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100518 deps += [ ":intelligibility_proc" ]
kjellander6ceab082016-10-28 05:44:03 -0700519 }
520
521 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100522 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800523 ":audioproc_f",
524 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200525 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700526 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800527 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800528 ]
kjellander6ceab082016-10-28 05:44:03 -0700529 }
530 }
531
ehmaldonado36268652017-01-19 08:27:11 -0800532 rtc_source_set("audio_processing_unittests") {
533 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700534
ehmaldonado36268652017-01-19 08:27:11 -0800535 sources = [
536 "aec/echo_cancellation_unittest.cc",
537 "aec/system_delay_unittest.cc",
538 "agc/agc_manager_direct_unittest.cc",
539 "agc/loudness_histogram_unittest.cc",
540 "agc/mock_agc.h",
541 "audio_buffer_unittest.cc",
542 "beamformer/array_util_unittest.cc",
543 "beamformer/complex_matrix_unittest.cc",
544 "beamformer/covariance_matrix_generator_unittest.cc",
545 "beamformer/matrix_unittest.cc",
546 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800547 "config_unittest.cc",
548 "echo_cancellation_impl_unittest.cc",
549 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200550 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800551 "transient/dyadic_decimator_unittest.cc",
552 "transient/file_utils.cc",
553 "transient/file_utils.h",
554 "transient/file_utils_unittest.cc",
555 "transient/moving_moments_unittest.cc",
556 "transient/transient_detector_unittest.cc",
557 "transient/transient_suppressor_unittest.cc",
558 "transient/wpd_node_unittest.cc",
559 "transient/wpd_tree_unittest.cc",
560 "utility/block_mean_calculator_unittest.cc",
561 "utility/delay_estimator_unittest.cc",
562 "vad/gmm_unittest.cc",
563 "vad/pitch_based_vad_unittest.cc",
564 "vad/pitch_internal_unittest.cc",
565 "vad/pole_zero_filter_unittest.cc",
566 "vad/standalone_vad_unittest.cc",
567 "vad/vad_audio_proc_unittest.cc",
568 "vad/vad_circular_buffer_unittest.cc",
569 "vad/voice_activity_detector_unittest.cc",
570 ]
571
572 deps = [
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100573 ":aec_core",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200574 ":analog_mic_simulation",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100575 ":apm_logging",
ehmaldonado36268652017-01-19 08:27:11 -0800576 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800577 ":audioproc_test_utils",
mbonadei1140f972017-04-26 03:38:35 -0700578 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800579 "../..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700580 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700581 "../../api:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800582 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700583 "../../rtc_base:gtest_prod",
584 "../../rtc_base:protobuf_utils",
585 "../../rtc_base:rtc_base",
586 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100587 "../../system_wrappers",
588 "../../system_wrappers:cpu_features_api",
ehmaldonado36268652017-01-19 08:27:11 -0800589 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200590 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700591 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700592 "test/conversational_speech:unittest",
ehmaldonado36268652017-01-19 08:27:11 -0800593 "//testing/gmock",
594 "//testing/gtest",
595 ]
596
597 defines = []
598
599 if (apm_debug_dump) {
600 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
601 } else {
602 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
603 }
604
605 if (rtc_enable_intelligibility_enhancer) {
606 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
607 sources += [
608 "intelligibility/intelligibility_enhancer_unittest.cc",
609 "intelligibility/intelligibility_utils_unittest.cc",
610 ]
611 } else {
612 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
613 }
614
615 if (rtc_prefer_fixed_point) {
616 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
617 } else {
618 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
619 }
620
621 if (rtc_enable_protobuf) {
622 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
623 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800624 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800625 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200626 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800627 ":audioproc_unittest_proto",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700628 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700629 "aec_dump",
630 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800631 ]
632 sources += [
peah522d71b2017-02-23 05:16:26 -0800633 "aec3/adaptive_fir_filter_unittest.cc",
634 "aec3/aec3_fft_unittest.cc",
635 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800636 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800637 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800638 "aec3/block_processor_unittest.cc",
639 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800640 "aec3/comfort_noise_generator_unittest.cc",
Per Åhgren38e2d952017-11-17 14:54:28 +0100641 "aec3/decimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800642 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800643 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800644 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800645 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800646 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800647 "aec3/erl_estimator_unittest.cc",
648 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800649 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800650 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800651 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800652 "aec3/matched_filter_lag_aggregator_unittest.cc",
653 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800654 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700655 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800656 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800657 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800658 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800659 "aec3/render_signal_analyzer_unittest.cc",
660 "aec3/residual_echo_estimator_unittest.cc",
661 "aec3/shadow_filter_update_gain_unittest.cc",
662 "aec3/subtractor_unittest.cc",
663 "aec3/suppression_filter_unittest.cc",
664 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700665 "aec3/vector_math_unittest.cc",
alessiob3ec96df2017-05-22 06:57:06 -0700666 "agc2/gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800667 "audio_processing_impl_locking_unittest.cc",
668 "audio_processing_impl_unittest.cc",
669 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800670 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800671 "echo_cancellation_bit_exact_unittest.cc",
672 "echo_control_mobile_unittest.cc",
673 "echo_detector/circular_buffer_unittest.cc",
674 "echo_detector/mean_variance_estimator_unittest.cc",
675 "echo_detector/moving_max_unittest.cc",
676 "echo_detector/normalized_covariance_estimator_unittest.cc",
677 "gain_control_unittest.cc",
678 "level_controller/level_controller_unittest.cc",
679 "level_estimator_unittest.cc",
680 "low_cut_filter_unittest.cc",
681 "noise_suppression_unittest.cc",
682 "residual_echo_detector_unittest.cc",
683 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800684 "test/debug_dump_replayer.cc",
685 "test/debug_dump_replayer.h",
686 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800687 "test/echo_canceller_test_tools.cc",
688 "test/echo_canceller_test_tools.h",
689 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800690 "test/test_utils.h",
691 "voice_detection_unittest.cc",
692 ]
693 }
694
695 if ((!build_with_chromium || is_win) && is_clang) {
696 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
697 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
698 }
699 }
700
ehmaldonado021eef32017-01-05 07:09:50 -0800701 rtc_source_set("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800702 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700703
ehmaldonado021eef32017-01-05 07:09:50 -0800704 sources = [
705 "audio_processing_performance_unittest.cc",
706 "level_controller/level_controller_complexity_unittest.cc",
ehmaldonado021eef32017-01-05 07:09:50 -0800707 ]
708 deps = [
709 ":audio_processing",
710 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100711 "../../api:array_view",
712 "../../modules:module_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700713 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100714 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100715 "../../system_wrappers",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100716 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800717 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700718
ehmaldonado021eef32017-01-05 07:09:50 -0800719 if (rtc_enable_intelligibility_enhancer) {
720 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
721 } else {
722 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
723 }
724 }
725
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200726 rtc_source_set("analog_mic_simulation") {
727 sources = [
728 "test/fake_recording_device.cc",
729 "test/fake_recording_device.h",
730 ]
731 deps = [
732 "../../api:array_view",
733 "../../common_audio:common_audio",
734 "../../modules:module_api",
735 "../../rtc_base:rtc_base_approved",
736 ]
737 }
738
ehmaldonado1fd08c12017-01-17 02:37:34 -0800739 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800740 rtc_executable("audioproc_f") {
741 testonly = true
742 sources = [
743 "test/aec_dump_based_simulator.cc",
744 "test/aec_dump_based_simulator.h",
745 "test/audio_processing_simulator.cc",
746 "test/audio_processing_simulator.h",
747 "test/audioproc_float.cc",
748 "test/wav_based_simulator.cc",
749 "test/wav_based_simulator.h",
750 ]
peahc3ec1fd2016-08-07 23:19:30 -0700751
ehmaldonado1fd08c12017-01-17 02:37:34 -0800752 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200753 ":analog_mic_simulation",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800754 ":audio_processing",
755 ":audioproc_debug_proto",
756 ":audioproc_protobuf_utils",
757 ":audioproc_test_utils",
kwiberg84f6a3f2017-09-05 08:43:13 -0700758 "../../api:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800759 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700760 "../../rtc_base:protobuf_utils",
761 "../../rtc_base:rtc_base_approved",
762 "../../rtc_base:rtc_task_queue",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800763 "../../system_wrappers",
764 "../../system_wrappers:system_wrappers_default",
765 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700766 "aec_dump",
767 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800768 "//testing/gtest",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800769 ]
770 } # audioproc_f
771 }
peahc3ec1fd2016-08-07 23:19:30 -0700772
ehmaldonado38a21322016-09-02 04:10:34 -0700773 rtc_source_set("audioproc_test_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700774 testonly = true
775 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700776 "test/audio_buffer_tools.cc",
777 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200778 "test/bitexactness_tools.cc",
779 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800780 "test/performance_timer.cc",
781 "test/performance_timer.h",
782 "test/simulator_buffers.cc",
783 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700784 "test/test_utils.cc",
785 "test/test_utils.h",
786 ]
787
kjellanderfb114242016-06-13 00:19:48 -0700788 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800789 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700790 "..:module_api",
kwiberg529662a2017-09-04 05:43:17 -0700791 "../../api:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -0700792 "../../api:optional",
kjellanderfb114242016-06-13 00:19:48 -0700793 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700794 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100795 "../../system_wrappers",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200796 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200797 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200798 "//testing/gtest",
kjellanderfb114242016-06-13 00:19:48 -0700799 ]
800 }
801
ehmaldonado38a21322016-09-02 04:10:34 -0700802 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700803 testonly = true
804 sources = [
805 "transient/file_utils.cc",
806 "transient/file_utils.h",
807 "transient/transient_suppression_test.cc",
808 ]
809 deps = [
810 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700811 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800812 "../..:webrtc_common",
813 "../../common_audio:common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700814 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100815 "../../system_wrappers",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100816 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700817 "../../test:test_support",
818 "//testing/gtest",
kwiberg7a770e02016-08-25 02:32:43 -0700819 ]
kwiberg7a770e02016-08-25 02:32:43 -0700820 }
821
ehmaldonado38a21322016-09-02 04:10:34 -0700822 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700823 testonly = true
824 sources = [
825 "transient/click_annotate.cc",
826 "transient/file_utils.cc",
827 "transient/file_utils.h",
828 ]
829 deps = [
830 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800831 "../..:webrtc_common",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100832 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700833 "../../system_wrappers:metrics_default",
834 ]
835 }
836
ehmaldonado38a21322016-09-02 04:10:34 -0700837 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700838 testonly = true
839 sources = [
840 "beamformer/nonlinear_beamformer_test.cc",
841 ]
842 deps = [
843 ":audio_processing",
844 ":audioproc_test_utils",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800845 "../../common_audio:common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700846 "../../rtc_base:rtc_base_approved",
kwiberg7a770e02016-08-25 02:32:43 -0700847 "../../system_wrappers:metrics_default",
kwiberg7a770e02016-08-25 02:32:43 -0700848 ]
kwiberg7a770e02016-08-25 02:32:43 -0700849 }
850
peah1bcfce52016-08-26 07:16:04 -0700851 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700852 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700853 testonly = true
854 sources = [
855 "intelligibility/test/intelligibility_proc.cc",
856 ]
857 deps = [
858 ":audio_processing",
859 ":audioproc_test_utils",
oprypin6e09d872017-08-31 03:21:39 -0700860 "../../rtc_base:rtc_base_approved",
peah1bcfce52016-08-26 07:16:04 -0700861 "../../system_wrappers:metrics_default",
862 "../../test:test_support",
863 "//testing/gtest",
peah1bcfce52016-08-26 07:16:04 -0700864 ]
kwiberg7a770e02016-08-25 02:32:43 -0700865 }
866 }
867
kjellanderfb114242016-06-13 00:19:48 -0700868 if (rtc_enable_protobuf) {
869 proto_library("audioproc_unittest_proto") {
870 sources = [
871 "test/unittest.proto",
872 ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200873 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700874 }
875
kjellanderb62dbbe2016-09-23 00:38:52 -0700876 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700877 sources = [
878 "test/protobuf_utils.cc",
879 "test/protobuf_utils.h",
880 ]
881
882 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700883 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800884 "../..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700885 "../../rtc_base:protobuf_utils",
886 "../../rtc_base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700887 ]
888 }
889 }
890}