blob: 92a8f177a02040fa175db389096617f8436a9576 [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 = [
peah8df5d4f2016-02-23 14:34:59 -080022 "aec/aec_core.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000023 "aec/aec_core.h",
peahe687f782016-05-09 03:57:33 -070024 "aec/aec_core_optimized_methods.h",
peah88950cf2016-03-04 00:12:40 -080025 "aec/aec_resampler.cc",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000026 "aec/aec_resampler.h",
peah8df5d4f2016-02-23 14:34:59 -080027 "aec/echo_cancellation.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010028 "aec/echo_cancellation.h",
peah522d71b2017-02-23 05:16:26 -080029 "aec3/adaptive_fir_filter.cc",
30 "aec3/adaptive_fir_filter.h",
31 "aec3/aec3_common.cc",
32 "aec3/aec3_common.h",
33 "aec3/aec3_fft.cc",
34 "aec3/aec3_fft.h",
35 "aec3/aec_state.cc",
36 "aec3/aec_state.h",
peahd0263542017-01-03 04:20:34 -080037 "aec3/block_framer.cc",
38 "aec3/block_framer.h",
39 "aec3/block_processor.cc",
40 "aec3/block_processor.h",
peahe985b3f2017-02-28 22:08:53 -080041 "aec3/block_processor_metrics.cc",
42 "aec3/block_processor_metrics.h",
peahd0263542017-01-03 04:20:34 -080043 "aec3/cascaded_biquad_filter.cc",
44 "aec3/cascaded_biquad_filter.h",
peah522d71b2017-02-23 05:16:26 -080045 "aec3/comfort_noise_generator.cc",
46 "aec3/comfort_noise_generator.h",
peah21920892017-02-08 05:08:56 -080047 "aec3/decimator_by_4.cc",
48 "aec3/decimator_by_4.h",
peahcf02cf12017-04-05 14:18:07 -070049 "aec3/downsampled_render_buffer.cc",
50 "aec3/downsampled_render_buffer.h",
peahe0eae3c2016-12-14 01:16:23 -080051 "aec3/echo_canceller3.cc",
52 "aec3/echo_canceller3.h",
peah69221db2017-01-27 03:28:19 -080053 "aec3/echo_path_delay_estimator.cc",
54 "aec3/echo_path_delay_estimator.h",
peah522d71b2017-02-23 05:16:26 -080055 "aec3/echo_path_variability.cc",
peah69221db2017-01-27 03:28:19 -080056 "aec3/echo_path_variability.h",
57 "aec3/echo_remover.cc",
58 "aec3/echo_remover.h",
peahe985b3f2017-02-28 22:08:53 -080059 "aec3/echo_remover_metrics.cc",
60 "aec3/echo_remover_metrics.h",
peah522d71b2017-02-23 05:16:26 -080061 "aec3/erl_estimator.cc",
62 "aec3/erl_estimator.h",
63 "aec3/erle_estimator.cc",
64 "aec3/erle_estimator.h",
peah522d71b2017-02-23 05:16:26 -080065 "aec3/fft_data.h",
peahd0263542017-01-03 04:20:34 -080066 "aec3/frame_blocker.cc",
67 "aec3/frame_blocker.h",
peah522d71b2017-02-23 05:16:26 -080068 "aec3/main_filter_update_gain.cc",
69 "aec3/main_filter_update_gain.h",
peah21920892017-02-08 05:08:56 -080070 "aec3/matched_filter.cc",
71 "aec3/matched_filter.h",
72 "aec3/matched_filter_lag_aggregator.cc",
73 "aec3/matched_filter_lag_aggregator.h",
peah522d71b2017-02-23 05:16:26 -080074 "aec3/output_selector.cc",
75 "aec3/output_selector.h",
peahcf02cf12017-04-05 14:18:07 -070076 "aec3/render_buffer.cc",
77 "aec3/render_buffer.h",
peah69221db2017-01-27 03:28:19 -080078 "aec3/render_delay_buffer.cc",
79 "aec3/render_delay_buffer.h",
80 "aec3/render_delay_controller.cc",
81 "aec3/render_delay_controller.h",
peahe985b3f2017-02-28 22:08:53 -080082 "aec3/render_delay_controller_metrics.cc",
83 "aec3/render_delay_controller_metrics.h",
peah522d71b2017-02-23 05:16:26 -080084 "aec3/render_signal_analyzer.cc",
85 "aec3/render_signal_analyzer.h",
86 "aec3/residual_echo_estimator.cc",
87 "aec3/residual_echo_estimator.h",
88 "aec3/shadow_filter_update_gain.cc",
89 "aec3/shadow_filter_update_gain.h",
90 "aec3/subtractor.cc",
91 "aec3/subtractor.h",
92 "aec3/subtractor_output.h",
93 "aec3/suppression_filter.cc",
94 "aec3/suppression_filter.h",
95 "aec3/suppression_gain.cc",
96 "aec3/suppression_gain.h",
peah5e79b292017-04-12 01:20:45 -070097 "aec3/vector_math.h",
peah27045122016-04-10 22:38:14 -070098 "aecm/aecm_core.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000099 "aecm/aecm_core.h",
peah27045122016-04-10 22:38:14 -0700100 "aecm/echo_control_mobile.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100101 "aecm/echo_control_mobile.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000102 "agc/agc.cc",
103 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000104 "agc/agc_manager_direct.cc",
105 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000106 "agc/gain_map_internal.h",
peahbbe42332016-06-08 06:42:02 -0700107 "agc/loudness_histogram.cc",
108 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000109 "agc/utility.cc",
110 "agc/utility.h",
alessiob3ec96df2017-05-22 06:57:06 -0700111 "agc2/digital_gain_applier.cc",
112 "agc2/digital_gain_applier.h",
113 "agc2/gain_controller2.cc",
114 "agc2/gain_controller2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000115 "audio_buffer.cc",
116 "audio_buffer.h",
117 "audio_processing_impl.cc",
118 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -0700119 "beamformer/array_util.cc",
120 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000121 "beamformer/complex_matrix.h",
122 "beamformer/covariance_matrix_generator.cc",
123 "beamformer/covariance_matrix_generator.h",
124 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +0000125 "beamformer/nonlinear_beamformer.cc",
126 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000127 "common.h",
128 "echo_cancellation_impl.cc",
129 "echo_cancellation_impl.h",
130 "echo_control_mobile_impl.cc",
131 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700132 "echo_detector/circular_buffer.cc",
133 "echo_detector/circular_buffer.h",
134 "echo_detector/mean_variance_estimator.cc",
135 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800136 "echo_detector/moving_max.cc",
137 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700138 "echo_detector/normalized_covariance_estimator.cc",
139 "echo_detector/normalized_covariance_estimator.h",
peahbe615622016-02-13 16:40:47 -0800140 "gain_control_for_experimental_agc.cc",
141 "gain_control_for_experimental_agc.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000142 "gain_control_impl.cc",
143 "gain_control_impl.h",
peahc19f3122016-10-07 14:54:10 -0700144 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000145 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -0700146 "include/config.cc",
147 "include/config.h",
peahca4cac72016-06-29 15:26:12 -0700148 "level_controller/biquad_filter.cc",
149 "level_controller/biquad_filter.h",
150 "level_controller/down_sampler.cc",
151 "level_controller/down_sampler.h",
152 "level_controller/gain_applier.cc",
153 "level_controller/gain_applier.h",
154 "level_controller/gain_selector.cc",
155 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -0700156 "level_controller/level_controller.cc",
157 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -0700158 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -0700159 "level_controller/noise_level_estimator.cc",
160 "level_controller/noise_level_estimator.h",
161 "level_controller/noise_spectrum_estimator.cc",
162 "level_controller/noise_spectrum_estimator.h",
163 "level_controller/peak_level_estimator.cc",
164 "level_controller/peak_level_estimator.h",
165 "level_controller/saturating_gain_estimator.cc",
166 "level_controller/saturating_gain_estimator.h",
167 "level_controller/signal_classifier.cc",
168 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000169 "level_estimator_impl.cc",
170 "level_estimator_impl.h",
peahb46083e2016-05-03 07:01:18 -0700171 "logging/apm_data_dumper.cc",
172 "logging/apm_data_dumper.h",
peah8271d042016-11-22 07:24:52 -0800173 "low_cut_filter.cc",
174 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000175 "noise_suppression_impl.cc",
176 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800177 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700178 "residual_echo_detector.cc",
179 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000180 "rms_level.cc",
181 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000182 "splitting_filter.cc",
183 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700184 "three_band_filter_bank.cc",
185 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000186 "transient/common.h",
187 "transient/daubechies_8_wavelet_coeffs.h",
188 "transient/dyadic_decimator.h",
189 "transient/moving_moments.cc",
190 "transient/moving_moments.h",
191 "transient/transient_detector.cc",
192 "transient/transient_detector.h",
193 "transient/transient_suppressor.cc",
194 "transient/transient_suppressor.h",
195 "transient/wpd_node.cc",
196 "transient/wpd_node.h",
197 "transient/wpd_tree.cc",
198 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000199 "typing_detection.cc",
200 "typing_detection.h",
minyue84db6fa2016-03-24 14:36:25 -0700201 "utility/block_mean_calculator.cc",
202 "utility/block_mean_calculator.h",
peahbdb7af62016-04-12 14:47:40 -0700203 "utility/delay_estimator.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000204 "utility/delay_estimator.h",
205 "utility/delay_estimator_internal.h",
peahbdb7af62016-04-12 14:47:40 -0700206 "utility/delay_estimator_wrapper.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000207 "utility/delay_estimator_wrapper.h",
peah81b92912016-10-06 06:46:20 -0700208 "utility/ooura_fft.cc",
209 "utility/ooura_fft.h",
210 "utility/ooura_fft_tables_common.h",
aluebsecf6b812015-06-25 12:28:48 -0700211 "vad/common.h",
212 "vad/gmm.cc",
213 "vad/gmm.h",
214 "vad/noise_gmm_tables.h",
215 "vad/pitch_based_vad.cc",
216 "vad/pitch_based_vad.h",
217 "vad/pitch_internal.cc",
218 "vad/pitch_internal.h",
219 "vad/pole_zero_filter.cc",
220 "vad/pole_zero_filter.h",
221 "vad/standalone_vad.cc",
222 "vad/standalone_vad.h",
223 "vad/vad_audio_proc.cc",
224 "vad/vad_audio_proc.h",
225 "vad/vad_audio_proc_internal.h",
226 "vad/vad_circular_buffer.cc",
227 "vad/vad_circular_buffer.h",
228 "vad/voice_activity_detector.cc",
229 "vad/voice_activity_detector.h",
230 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000231 "voice_detection_impl.cc",
232 "voice_detection_impl.h",
233 ]
234
235 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200236 deps = [
aleloi868f32f2017-05-23 07:20:05 -0700237 ":aec_dump_interface",
mbonadei1140f972017-04-26 03:38:35 -0700238 "..:module_api",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200239 "../..:webrtc_common",
aleloi6321b492016-12-05 01:46:09 -0800240 "../../audio/utility:audio_frame_operations",
ehmaldonado370dd472017-07-10 05:58:42 -0700241 "../../base:gtest_prod",
242 "../../base:protobuf_utils",
kwiberg98ab3a42015-09-30 21:54:21 -0700243 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200244 ]
kjellander7439f972016-12-05 22:47:46 -0800245 public_deps = [
246 ":audio_processing_c",
247 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000248
peahf28a3892016-09-01 08:58:21 -0700249 if (apm_debug_dump) {
250 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700251 } else {
peahf28a3892016-09-01 08:58:21 -0700252 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000253 }
254
255 if (aec_untrusted_delay_for_testing) {
256 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
257 }
258
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000259 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000260 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
261 deps += [ ":audioproc_debug_proto" ]
262 }
263
peah1bcfce52016-08-26 07:16:04 -0700264 if (rtc_enable_intelligibility_enhancer) {
265 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
266 sources += [
267 "intelligibility/intelligibility_enhancer.cc",
268 "intelligibility/intelligibility_enhancer.h",
269 "intelligibility/intelligibility_utils.cc",
270 "intelligibility/intelligibility_utils.h",
271 ]
272 } else {
273 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
274 }
275
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000276 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000277 defines += [ "WEBRTC_NS_FIXED" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000278 } else {
279 defines += [ "WEBRTC_NS_FLOAT" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000280 }
281
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000282 if (current_cpu == "x86" || current_cpu == "x64") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000283 deps += [ ":audio_processing_sse2" ]
284 }
285
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700286 if (rtc_build_with_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000287 deps += [ ":audio_processing_neon" ]
288 }
289
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000290 if (current_cpu == "mipsel") {
peah27045122016-04-10 22:38:14 -0700291 sources += [ "aecm/aecm_core_mips.cc" ]
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000292 if (mips_float_abi == "hard") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000293 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800294 "aec/aec_core_mips.cc",
peah81b92912016-10-06 06:46:20 -0700295 "utility/ooura_fft_mips.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000296 ]
297 }
298 } else {
peah27045122016-04-10 22:38:14 -0700299 sources += [ "aecm/aecm_core_c.cc" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000300 }
301
kjellander8f4419b2016-06-02 02:09:52 -0700302 # TODO(jschuh): Bug 1348: fix this warning.
303 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000304
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000305 deps += [
ehmaldonado370dd472017-07-10 05:58:42 -0700306 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000307 "../../common_audio",
308 "../../system_wrappers",
309 ]
310}
311
aleloi868f32f2017-05-23 07:20:05 -0700312rtc_source_set("aec_dump_interface") {
313 sources = [
314 "include/aec_dump.cc",
315 "include/aec_dump.h",
316 ]
317
318 deps = [
ehmaldonado370dd472017-07-10 05:58:42 -0700319 "../../base:rtc_base_approved",
aleloi868f32f2017-05-23 07:20:05 -0700320 ]
321}
322
kjellander7439f972016-12-05 22:47:46 -0800323rtc_source_set("audio_processing_c") {
324 visibility = [ ":*" ] # Only targets in this file can depend on this.
325 sources = [
326 "agc/legacy/analog_agc.c",
327 "agc/legacy/analog_agc.h",
328 "agc/legacy/digital_agc.c",
329 "agc/legacy/digital_agc.h",
330 "agc/legacy/gain_control.h",
331 ]
332
333 if (rtc_prefer_fixed_point) {
334 sources += [
335 "ns/noise_suppression_x.c",
336 "ns/noise_suppression_x.h",
337 "ns/nsx_core.c",
338 "ns/nsx_core.h",
339 "ns/nsx_defines.h",
340 ]
341 if (current_cpu == "mipsel") {
342 sources += [ "ns/nsx_core_mips.c" ]
343 } else {
344 sources += [ "ns/nsx_core_c.c" ]
345 }
346 } else {
347 sources += [
348 "ns/defines.h",
349 "ns/noise_suppression.c",
350 "ns/noise_suppression.h",
351 "ns/ns_core.c",
352 "ns/ns_core.h",
353 "ns/windows_private.h",
354 ]
355 }
356
357 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800358 "../..:webrtc_common",
ehmaldonado370dd472017-07-10 05:58:42 -0700359 "../../base:rtc_base_approved",
kjellander7439f972016-12-05 22:47:46 -0800360 "../../common_audio",
361 "../../system_wrappers",
362 ]
mbonadeie5dc3ce2017-01-25 05:34:46 -0800363
364 if (rtc_build_with_neon) {
365 deps += [ ":audio_processing_neon_c" ]
366 }
kjellander7439f972016-12-05 22:47:46 -0800367}
368
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000369if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000370 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200371 sources = [
372 "debug.proto",
373 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000374
kjellander78ddd732016-02-09 08:13:06 -0800375 proto_out_dir = "webrtc/modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000376 }
377}
378
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000379if (current_cpu == "x86" || current_cpu == "x64") {
kjellanderb62dbbe2016-09-23 00:38:52 -0700380 rtc_static_library("audio_processing_sse2") {
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800381 # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828)
382 # Errors on cyclic dependency with :audio_processing if enabled.
383 check_includes = false
384
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000385 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800386 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700387 "utility/ooura_fft_sse2.cc",
388 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000389 ]
390
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200391 if (is_posix) {
392 cflags = [ "-msse2" ]
393 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000394
peahf28a3892016-09-01 08:58:21 -0700395 if (apm_debug_dump) {
396 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700397 } else {
peahf28a3892016-09-01 08:58:21 -0700398 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700399 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000400 }
401}
402
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700403if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700404 rtc_static_library("audio_processing_neon") {
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800405 # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828)
406 # Errors on cyclic dependency with :audio_processing if enabled.
407 check_includes = false
408
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000409 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800410 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700411 "aecm/aecm_core_neon.cc",
peah81b92912016-10-06 06:46:20 -0700412 "utility/ooura_fft_neon.cc",
413 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000414 ]
415
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000416 if (current_cpu != "arm64") {
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700417 # Enable compilation for the NEON instruction set. This is needed
418 # since //build/config/arm.gni only enables NEON for iOS, not Android.
419 # This provides the same functionality as webrtc/build/arm_neon.gypi.
ehmaldonado38a21322016-09-02 04:10:34 -0700420 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200421 cflags = [ "-mfpu=neon" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000422 }
423
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700424 # Disable LTO on NEON targets due to compiler bug.
425 # TODO(fdegans): Enable this. See crbug.com/408997.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000426 if (rtc_use_lto) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000427 cflags -= [
428 "-flto",
429 "-ffat-lto-objects",
430 ]
431 }
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700432
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700433 deps = [
434 "../../common_audio",
435 ]
kjellander7439f972016-12-05 22:47:46 -0800436 public_deps = [
437 ":audio_processing_neon_c",
438 ]
peahb46083e2016-05-03 07:01:18 -0700439
peahf28a3892016-09-01 08:58:21 -0700440 if (apm_debug_dump) {
441 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700442 } else {
peahf28a3892016-09-01 08:58:21 -0700443 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700444 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000445 }
kjellander7439f972016-12-05 22:47:46 -0800446
447 rtc_static_library("audio_processing_neon_c") {
mbonadeie5dc3ce2017-01-25 05:34:46 -0800448 # TODO(mbonadei): Remove (bugs.webrtc.org/6828)
449 # Errors on cyclic dependency with :audio_processing_c if enabled.
450 check_includes = false
451
kjellander7439f972016-12-05 22:47:46 -0800452 sources = [
453 "ns/nsx_core_neon.c",
454 ]
455
456 if (current_cpu != "arm64") {
457 # Enable compilation for the NEON instruction set. This is needed
458 # since //build/config/arm.gni only enables NEON for iOS, not Android.
459 # This provides the same functionality as webrtc/build/arm_neon.gypi.
460 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
461 cflags = [ "-mfpu=neon" ]
462 }
463
464 # Disable LTO on NEON targets due to compiler bug.
465 # TODO(fdegans): Enable this. See crbug.com/408997.
466 if (rtc_use_lto) {
467 cflags -= [
468 "-flto",
469 "-ffat-lto-objects",
470 ]
471 }
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800472 deps = [
ehmaldonado370dd472017-07-10 05:58:42 -0700473 "../../base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800474 ]
kjellander7439f972016-12-05 22:47:46 -0800475 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000476}
kjellanderfb114242016-06-13 00:19:48 -0700477
478if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -0700479 group("audio_processing_tests") {
480 testonly = true
481 public_deps = [
kjellander6ceab082016-10-28 05:44:03 -0700482 ":audioproc_test_utils",
483 ":click_annotate",
484 ":nonlinear_beamformer_test",
485 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700486 ]
487
488 if (rtc_enable_intelligibility_enhancer) {
489 public_deps += [ ":intelligibility_proc" ]
490 }
491
492 if (rtc_enable_protobuf) {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800493 public_deps += [
494 ":audioproc_f",
495 ":audioproc_unittest_proto",
496 ":unpack_aecdump",
alessiob5f32aca2017-03-18 02:29:13 -0700497 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800498 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800499 ]
kjellander6ceab082016-10-28 05:44:03 -0700500 }
501 }
502
ehmaldonado36268652017-01-19 08:27:11 -0800503 rtc_source_set("audio_processing_unittests") {
504 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700505
506 # Skip restricting visibility on mobile platforms since the tests on those
507 # gets additional generated targets which would require many lines here to
508 # cover (which would be confusing to read and hard to maintain).
509 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700510 visibility = [ "..:modules_unittests" ]
kjellandere0629c02017-04-25 04:04:50 -0700511 }
ehmaldonado36268652017-01-19 08:27:11 -0800512 sources = [
513 "aec/echo_cancellation_unittest.cc",
514 "aec/system_delay_unittest.cc",
515 "agc/agc_manager_direct_unittest.cc",
516 "agc/loudness_histogram_unittest.cc",
517 "agc/mock_agc.h",
518 "audio_buffer_unittest.cc",
519 "beamformer/array_util_unittest.cc",
520 "beamformer/complex_matrix_unittest.cc",
521 "beamformer/covariance_matrix_generator_unittest.cc",
522 "beamformer/matrix_unittest.cc",
523 "beamformer/mock_nonlinear_beamformer.h",
ehmaldonado36268652017-01-19 08:27:11 -0800524 "config_unittest.cc",
525 "echo_cancellation_impl_unittest.cc",
526 "splitting_filter_unittest.cc",
527 "transient/dyadic_decimator_unittest.cc",
528 "transient/file_utils.cc",
529 "transient/file_utils.h",
530 "transient/file_utils_unittest.cc",
531 "transient/moving_moments_unittest.cc",
532 "transient/transient_detector_unittest.cc",
533 "transient/transient_suppressor_unittest.cc",
534 "transient/wpd_node_unittest.cc",
535 "transient/wpd_tree_unittest.cc",
536 "utility/block_mean_calculator_unittest.cc",
537 "utility/delay_estimator_unittest.cc",
538 "vad/gmm_unittest.cc",
539 "vad/pitch_based_vad_unittest.cc",
540 "vad/pitch_internal_unittest.cc",
541 "vad/pole_zero_filter_unittest.cc",
542 "vad/standalone_vad_unittest.cc",
543 "vad/vad_audio_proc_unittest.cc",
544 "vad/vad_circular_buffer_unittest.cc",
545 "vad/voice_activity_detector_unittest.cc",
546 ]
547
548 deps = [
549 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800550 ":audioproc_test_utils",
mbonadei1140f972017-04-26 03:38:35 -0700551 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800552 "../..:webrtc_common",
ehmaldonado370dd472017-07-10 05:58:42 -0700553 "../../base:gtest_prod",
554 "../../base:protobuf_utils",
555 "../../base:rtc_base",
556 "../../base:rtc_base_approved",
ehmaldonado36268652017-01-19 08:27:11 -0800557 "../../common_audio:common_audio",
558 "../../system_wrappers:system_wrappers",
559 "../../test:test_support",
henrik.lundinb637a942017-04-28 00:59:45 -0700560 "../audio_coding:neteq_tools",
aleloi20e4a732017-06-08 08:12:46 -0700561 "aec_dump:mock_aec_dump_unittests",
alessiob4b6463c2017-03-23 05:17:06 -0700562 "test/conversational_speech:unittest",
ehmaldonado36268652017-01-19 08:27:11 -0800563 "//testing/gmock",
564 "//testing/gtest",
565 ]
566
567 defines = []
568
569 if (apm_debug_dump) {
570 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
571 } else {
572 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
573 }
574
575 if (rtc_enable_intelligibility_enhancer) {
576 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
577 sources += [
578 "intelligibility/intelligibility_enhancer_unittest.cc",
579 "intelligibility/intelligibility_utils_unittest.cc",
580 ]
581 } else {
582 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
583 }
584
585 if (rtc_prefer_fixed_point) {
586 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
587 } else {
588 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
589 }
590
591 if (rtc_enable_protobuf) {
592 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
593 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800594 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800595 ":audioproc_protobuf_utils",
596 ":audioproc_unittest_proto",
ehmaldonado370dd472017-07-10 05:58:42 -0700597 "../../base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700598 "aec_dump",
599 "aec_dump:aec_dump_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800600 ]
601 sources += [
peah522d71b2017-02-23 05:16:26 -0800602 "aec3/adaptive_fir_filter_unittest.cc",
603 "aec3/aec3_fft_unittest.cc",
604 "aec3/aec_state_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800605 "aec3/block_framer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800606 "aec3/block_processor_metrics_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800607 "aec3/block_processor_unittest.cc",
608 "aec3/cascaded_biquad_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800609 "aec3/comfort_noise_generator_unittest.cc",
peah21920892017-02-08 05:08:56 -0800610 "aec3/decimator_by_4_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800611 "aec3/echo_canceller3_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800612 "aec3/echo_path_delay_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800613 "aec3/echo_path_variability_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800614 "aec3/echo_remover_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800615 "aec3/echo_remover_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800616 "aec3/erl_estimator_unittest.cc",
617 "aec3/erle_estimator_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800618 "aec3/fft_data_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800619 "aec3/frame_blocker_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800620 "aec3/main_filter_update_gain_unittest.cc",
peah21920892017-02-08 05:08:56 -0800621 "aec3/matched_filter_lag_aggregator_unittest.cc",
622 "aec3/matched_filter_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800623 "aec3/output_selector_unittest.cc",
peahcf02cf12017-04-05 14:18:07 -0700624 "aec3/render_buffer_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800625 "aec3/render_delay_buffer_unittest.cc",
peahe985b3f2017-02-28 22:08:53 -0800626 "aec3/render_delay_controller_metrics_unittest.cc",
peah69221db2017-01-27 03:28:19 -0800627 "aec3/render_delay_controller_unittest.cc",
peah522d71b2017-02-23 05:16:26 -0800628 "aec3/render_signal_analyzer_unittest.cc",
629 "aec3/residual_echo_estimator_unittest.cc",
630 "aec3/shadow_filter_update_gain_unittest.cc",
631 "aec3/subtractor_unittest.cc",
632 "aec3/suppression_filter_unittest.cc",
633 "aec3/suppression_gain_unittest.cc",
peah5e79b292017-04-12 01:20:45 -0700634 "aec3/vector_math_unittest.cc",
alessiob3ec96df2017-05-22 06:57:06 -0700635 "agc2/gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800636 "audio_processing_impl_locking_unittest.cc",
637 "audio_processing_impl_unittest.cc",
638 "audio_processing_unittest.cc",
ehmaldonadof49ff262017-01-23 04:26:02 -0800639 "beamformer/nonlinear_beamformer_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800640 "echo_cancellation_bit_exact_unittest.cc",
641 "echo_control_mobile_unittest.cc",
642 "echo_detector/circular_buffer_unittest.cc",
643 "echo_detector/mean_variance_estimator_unittest.cc",
644 "echo_detector/moving_max_unittest.cc",
645 "echo_detector/normalized_covariance_estimator_unittest.cc",
646 "gain_control_unittest.cc",
647 "level_controller/level_controller_unittest.cc",
648 "level_estimator_unittest.cc",
649 "low_cut_filter_unittest.cc",
650 "noise_suppression_unittest.cc",
651 "residual_echo_detector_unittest.cc",
652 "rms_level_unittest.cc",
653 "test/bitexactness_tools.cc",
654 "test/bitexactness_tools.h",
655 "test/debug_dump_replayer.cc",
656 "test/debug_dump_replayer.h",
657 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800658 "test/echo_canceller_test_tools.cc",
659 "test/echo_canceller_test_tools.h",
660 "test/echo_canceller_test_tools_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800661 "test/test_utils.h",
662 "voice_detection_unittest.cc",
663 ]
664 }
665
666 if ((!build_with_chromium || is_win) && is_clang) {
667 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
668 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
669 }
670 }
671
ehmaldonado021eef32017-01-05 07:09:50 -0800672 rtc_source_set("audio_processing_perf_tests") {
673 # Has problems with autogenerated targets on Android and iOS
674 # Dependency chain (there may also be others):
675 # //webrtc/modules/audio_processing:audio_processing_perf_tests -->
676 # //webrtc/modules:modules_unittests --[private]-->
677 # //webrtc/modules:modules_unittests_apk -->
678 # //webrtc/modules:modules_unittests_apk__create -->
679 # //webrtc/modules:modules_unittests_apk__create__finalize -->
680 # //webrtc/modules:modules_unittests_apk__create__package --[private]-->
681 # //webrtc/modules:_modules_unittests__library
682 check_includes = false
683 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700684
685 # Skip restricting visibility on mobile platforms since the tests on those
686 # gets additional generated targets which would require many lines here to
687 # cover (which would be confusing to read and hard to maintain).
688 if (!is_android && !is_ios) {
jianjun.zhuc0247402017-07-11 06:20:45 -0700689 visibility = [ "../..:webrtc_perf_tests" ]
kjellandere0629c02017-04-25 04:04:50 -0700690 }
ehmaldonado021eef32017-01-05 07:09:50 -0800691 sources = [
692 "audio_processing_performance_unittest.cc",
693 "level_controller/level_controller_complexity_unittest.cc",
694 "residual_echo_detector_complexity_unittest.cc",
695 ]
696 deps = [
697 ":audio_processing",
698 ":audioproc_test_utils",
ehmaldonado370dd472017-07-10 05:58:42 -0700699 "../../base:protobuf_utils",
ehmaldonado021eef32017-01-05 07:09:50 -0800700 "//testing/gtest",
701 ]
mbonadei7c2c8432017-04-07 00:59:12 -0700702
ehmaldonado021eef32017-01-05 07:09:50 -0800703 if (rtc_enable_intelligibility_enhancer) {
704 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
705 } else {
706 defines = [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
707 }
708 }
709
ehmaldonado1fd08c12017-01-17 02:37:34 -0800710 if (rtc_enable_protobuf) {
711 rtc_executable("unpack_aecdump") {
712 testonly = true
713 sources = [
714 "test/unpack.cc",
715 ]
peahc3ec1fd2016-08-07 23:19:30 -0700716
ehmaldonado1fd08c12017-01-17 02:37:34 -0800717 deps = [
718 ":audio_processing",
719 ":audioproc_debug_proto",
720 ":audioproc_protobuf_utils",
721 ":audioproc_test_utils",
722 "../..:webrtc_common",
ehmaldonado370dd472017-07-10 05:58:42 -0700723 "../../base:protobuf_utils",
724 "../../base:rtc_base_approved",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800725 "../../common_audio",
726 "../../system_wrappers:system_wrappers_default",
727 "//third_party/gflags:gflags",
728 ]
729 } # unpack_aecdump
peahc3ec1fd2016-08-07 23:19:30 -0700730
ehmaldonado1fd08c12017-01-17 02:37:34 -0800731 rtc_executable("audioproc_f") {
732 testonly = true
733 sources = [
734 "test/aec_dump_based_simulator.cc",
735 "test/aec_dump_based_simulator.h",
736 "test/audio_processing_simulator.cc",
737 "test/audio_processing_simulator.h",
738 "test/audioproc_float.cc",
739 "test/wav_based_simulator.cc",
740 "test/wav_based_simulator.h",
741 ]
peahc3ec1fd2016-08-07 23:19:30 -0700742
ehmaldonado1fd08c12017-01-17 02:37:34 -0800743 deps = [
744 ":audio_processing",
745 ":audioproc_debug_proto",
746 ":audioproc_protobuf_utils",
747 ":audioproc_test_utils",
ehmaldonado370dd472017-07-10 05:58:42 -0700748 "../../base:protobuf_utils",
749 "../../base:rtc_base_approved",
750 "../../base:rtc_task_queue",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800751 "../../common_audio:common_audio",
752 "../../system_wrappers",
753 "../../system_wrappers:system_wrappers_default",
754 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700755 "aec_dump",
756 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800757 "//testing/gtest",
758 "//third_party/gflags:gflags",
759 ]
760 } # audioproc_f
761 }
peahc3ec1fd2016-08-07 23:19:30 -0700762
ehmaldonado38a21322016-09-02 04:10:34 -0700763 rtc_source_set("audioproc_test_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700764 testonly = true
765 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700766 "test/audio_buffer_tools.cc",
767 "test/audio_buffer_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800768 "test/performance_timer.cc",
769 "test/performance_timer.h",
770 "test/simulator_buffers.cc",
771 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700772 "test/test_utils.cc",
773 "test/test_utils.h",
774 ]
775
kjellanderfb114242016-06-13 00:19:48 -0700776 deps = [
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800777 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700778 "..:module_api",
ehmaldonado370dd472017-07-10 05:58:42 -0700779 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700780 "../../common_audio",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800781 "../../system_wrappers:system_wrappers",
kjellanderfb114242016-06-13 00:19:48 -0700782 ]
783 }
784
ehmaldonado38a21322016-09-02 04:10:34 -0700785 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700786 testonly = true
787 sources = [
788 "transient/file_utils.cc",
789 "transient/file_utils.h",
790 "transient/transient_suppression_test.cc",
791 ]
792 deps = [
793 ":audio_processing",
mbonadei1140f972017-04-26 03:38:35 -0700794 "..:module_api",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800795 "../..:webrtc_common",
796 "../../common_audio:common_audio",
kwiberg7a770e02016-08-25 02:32:43 -0700797 "../../system_wrappers:metrics_default",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800798 "../../system_wrappers:system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700799 "../../test:test_support",
800 "//testing/gtest",
801 "//third_party/gflags",
802 ]
kwiberg7a770e02016-08-25 02:32:43 -0700803 }
804
ehmaldonado38a21322016-09-02 04:10:34 -0700805 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700806 testonly = true
807 sources = [
808 "transient/click_annotate.cc",
809 "transient/file_utils.cc",
810 "transient/file_utils.h",
811 ]
812 deps = [
813 ":audio_processing",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800814 "../..:webrtc_common",
kwiberg7a770e02016-08-25 02:32:43 -0700815 "../../system_wrappers:metrics_default",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800816 "../../system_wrappers:system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700817 ]
818 }
819
ehmaldonado38a21322016-09-02 04:10:34 -0700820 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700821 testonly = true
822 sources = [
823 "beamformer/nonlinear_beamformer_test.cc",
824 ]
825 deps = [
826 ":audio_processing",
827 ":audioproc_test_utils",
ehmaldonado370dd472017-07-10 05:58:42 -0700828 "../../base:rtc_base_approved",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800829 "../../common_audio:common_audio",
kwiberg7a770e02016-08-25 02:32:43 -0700830 "../../system_wrappers:metrics_default",
831 "//third_party/gflags",
832 ]
kwiberg7a770e02016-08-25 02:32:43 -0700833 }
834
peah1bcfce52016-08-26 07:16:04 -0700835 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700836 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700837 testonly = true
838 sources = [
839 "intelligibility/test/intelligibility_proc.cc",
840 ]
841 deps = [
842 ":audio_processing",
843 ":audioproc_test_utils",
844 "../../system_wrappers:metrics_default",
845 "../../test:test_support",
846 "//testing/gtest",
847 "//third_party/gflags",
848 ]
kwiberg7a770e02016-08-25 02:32:43 -0700849 }
850 }
851
kjellanderfb114242016-06-13 00:19:48 -0700852 if (rtc_enable_protobuf) {
853 proto_library("audioproc_unittest_proto") {
854 sources = [
855 "test/unittest.proto",
856 ]
kjellandere3e902e2017-02-28 08:01:46 -0800857 proto_out_dir = "webrtc/modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700858 }
859
kjellanderb62dbbe2016-09-23 00:38:52 -0700860 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700861 sources = [
862 "test/protobuf_utils.cc",
863 "test/protobuf_utils.h",
864 ]
865
866 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700867 ":audioproc_debug_proto",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800868 "../..:webrtc_common",
ehmaldonado370dd472017-07-10 05:58:42 -0700869 "../../base:protobuf_utils",
870 "../../base:rtc_base_approved",
kjellanderfb114242016-06-13 00:19:48 -0700871 ]
872 }
873 }
874}