blob: 36c766798a93e316487784cd147b2c80eae1eab3 [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() {
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",
peah27045122016-04-10 22:38:14 -070029 "aecm/aecm_core.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000030 "aecm/aecm_core.h",
peah27045122016-04-10 22:38:14 -070031 "aecm/echo_control_mobile.cc",
Henrik Kjellander9b72af92015-11-11 20:16:11 +010032 "aecm/echo_control_mobile.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000033 "agc/agc.cc",
34 "agc/agc.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000035 "agc/agc_manager_direct.cc",
36 "agc/agc_manager_direct.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000037 "agc/gain_map_internal.h",
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000038 "agc/legacy/analog_agc.c",
39 "agc/legacy/analog_agc.h",
40 "agc/legacy/digital_agc.c",
41 "agc/legacy/digital_agc.h",
42 "agc/legacy/gain_control.h",
peahbbe42332016-06-08 06:42:02 -070043 "agc/loudness_histogram.cc",
44 "agc/loudness_histogram.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +000045 "agc/utility.cc",
46 "agc/utility.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000047 "audio_buffer.cc",
48 "audio_buffer.h",
49 "audio_processing_impl.cc",
50 "audio_processing_impl.h",
aluebs4a66e4a2015-10-19 18:02:39 -070051 "beamformer/array_util.cc",
52 "beamformer/array_util.h",
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000053 "beamformer/complex_matrix.h",
54 "beamformer/covariance_matrix_generator.cc",
55 "beamformer/covariance_matrix_generator.h",
56 "beamformer/matrix.h",
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000057 "beamformer/nonlinear_beamformer.cc",
58 "beamformer/nonlinear_beamformer.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000059 "common.h",
60 "echo_cancellation_impl.cc",
61 "echo_cancellation_impl.h",
62 "echo_control_mobile_impl.cc",
63 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -070064 "echo_detector/circular_buffer.cc",
65 "echo_detector/circular_buffer.h",
66 "echo_detector/mean_variance_estimator.cc",
67 "echo_detector/mean_variance_estimator.h",
68 "echo_detector/normalized_covariance_estimator.cc",
69 "echo_detector/normalized_covariance_estimator.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",
peahc19f3122016-10-07 14:54:10 -070074 "include/audio_processing.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000075 "include/audio_processing.h",
solenberg88499ec2016-09-07 07:34:41 -070076 "include/config.cc",
77 "include/config.h",
peahca4cac72016-06-29 15:26:12 -070078 "level_controller/biquad_filter.cc",
79 "level_controller/biquad_filter.h",
80 "level_controller/down_sampler.cc",
81 "level_controller/down_sampler.h",
82 "level_controller/gain_applier.cc",
83 "level_controller/gain_applier.h",
84 "level_controller/gain_selector.cc",
85 "level_controller/gain_selector.h",
peahca4cac72016-06-29 15:26:12 -070086 "level_controller/level_controller.cc",
87 "level_controller/level_controller.h",
peahc19f3122016-10-07 14:54:10 -070088 "level_controller/level_controller_constants.h",
peahca4cac72016-06-29 15:26:12 -070089 "level_controller/noise_level_estimator.cc",
90 "level_controller/noise_level_estimator.h",
91 "level_controller/noise_spectrum_estimator.cc",
92 "level_controller/noise_spectrum_estimator.h",
93 "level_controller/peak_level_estimator.cc",
94 "level_controller/peak_level_estimator.h",
95 "level_controller/saturating_gain_estimator.cc",
96 "level_controller/saturating_gain_estimator.h",
97 "level_controller/signal_classifier.cc",
98 "level_controller/signal_classifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000099 "level_estimator_impl.cc",
100 "level_estimator_impl.h",
peahb46083e2016-05-03 07:01:18 -0700101 "logging/apm_data_dumper.cc",
102 "logging/apm_data_dumper.h",
peah8271d042016-11-22 07:24:52 -0800103 "low_cut_filter.cc",
104 "low_cut_filter.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "noise_suppression_impl.cc",
106 "noise_suppression_impl.h",
peah737f4b82016-03-10 23:05:28 -0800107 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700108 "residual_echo_detector.cc",
109 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000110 "rms_level.cc",
111 "rms_level.h",
aluebs@webrtc.orgbe05c742014-11-14 22:18:10 +0000112 "splitting_filter.cc",
113 "splitting_filter.h",
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700114 "three_band_filter_bank.cc",
115 "three_band_filter_bank.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000116 "transient/common.h",
117 "transient/daubechies_8_wavelet_coeffs.h",
118 "transient/dyadic_decimator.h",
119 "transient/moving_moments.cc",
120 "transient/moving_moments.h",
121 "transient/transient_detector.cc",
122 "transient/transient_detector.h",
123 "transient/transient_suppressor.cc",
124 "transient/transient_suppressor.h",
125 "transient/wpd_node.cc",
126 "transient/wpd_node.h",
127 "transient/wpd_tree.cc",
128 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000129 "typing_detection.cc",
130 "typing_detection.h",
minyue84db6fa2016-03-24 14:36:25 -0700131 "utility/block_mean_calculator.cc",
132 "utility/block_mean_calculator.h",
peahbdb7af62016-04-12 14:47:40 -0700133 "utility/delay_estimator.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000134 "utility/delay_estimator.h",
135 "utility/delay_estimator_internal.h",
peahbdb7af62016-04-12 14:47:40 -0700136 "utility/delay_estimator_wrapper.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000137 "utility/delay_estimator_wrapper.h",
peah81b92912016-10-06 06:46:20 -0700138 "utility/ooura_fft.cc",
139 "utility/ooura_fft.h",
140 "utility/ooura_fft_tables_common.h",
aluebsecf6b812015-06-25 12:28:48 -0700141 "vad/common.h",
142 "vad/gmm.cc",
143 "vad/gmm.h",
144 "vad/noise_gmm_tables.h",
145 "vad/pitch_based_vad.cc",
146 "vad/pitch_based_vad.h",
147 "vad/pitch_internal.cc",
148 "vad/pitch_internal.h",
149 "vad/pole_zero_filter.cc",
150 "vad/pole_zero_filter.h",
151 "vad/standalone_vad.cc",
152 "vad/standalone_vad.h",
153 "vad/vad_audio_proc.cc",
154 "vad/vad_audio_proc.h",
155 "vad/vad_audio_proc_internal.h",
156 "vad/vad_circular_buffer.cc",
157 "vad/vad_circular_buffer.h",
158 "vad/voice_activity_detector.cc",
159 "vad/voice_activity_detector.h",
160 "vad/voice_gmm_tables.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000161 "voice_detection_impl.cc",
162 "voice_detection_impl.h",
163 ]
164
165 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200166 deps = [
167 "../..:webrtc_common",
aleloi6321b492016-12-05 01:46:09 -0800168 "../../audio/utility:audio_frame_operations",
kwiberg98ab3a42015-09-30 21:54:21 -0700169 "../audio_coding:isac",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200170 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000171
peahf28a3892016-09-01 08:58:21 -0700172 if (apm_debug_dump) {
173 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700174 } else {
peahf28a3892016-09-01 08:58:21 -0700175 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000176 }
177
178 if (aec_untrusted_delay_for_testing) {
179 defines += [ "WEBRTC_UNTRUSTED_DELAY" ]
180 }
181
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000182 if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000183 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
184 deps += [ ":audioproc_debug_proto" ]
185 }
186
peah1bcfce52016-08-26 07:16:04 -0700187 if (rtc_enable_intelligibility_enhancer) {
188 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=1" ]
189 sources += [
190 "intelligibility/intelligibility_enhancer.cc",
191 "intelligibility/intelligibility_enhancer.h",
192 "intelligibility/intelligibility_utils.cc",
193 "intelligibility/intelligibility_utils.h",
194 ]
195 } else {
196 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ]
197 }
198
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000199 if (rtc_prefer_fixed_point) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000200 defines += [ "WEBRTC_NS_FIXED" ]
201 sources += [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000202 "ns/noise_suppression_x.c",
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100203 "ns/noise_suppression_x.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000204 "ns/nsx_core.c",
205 "ns/nsx_core.h",
206 "ns/nsx_defines.h",
207 ]
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000208 if (current_cpu == "mipsel") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000209 sources += [ "ns/nsx_core_mips.c" ]
210 } else {
211 sources += [ "ns/nsx_core_c.c" ]
212 }
213 } else {
214 defines += [ "WEBRTC_NS_FLOAT" ]
215 sources += [
216 "ns/defines.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000217 "ns/noise_suppression.c",
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100218 "ns/noise_suppression.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000219 "ns/ns_core.c",
220 "ns/ns_core.h",
221 "ns/windows_private.h",
222 ]
223 }
224
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000225 if (current_cpu == "x86" || current_cpu == "x64") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000226 deps += [ ":audio_processing_sse2" ]
227 }
228
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700229 if (rtc_build_with_neon) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000230 deps += [ ":audio_processing_neon" ]
231 }
232
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000233 if (current_cpu == "mipsel") {
peah27045122016-04-10 22:38:14 -0700234 sources += [ "aecm/aecm_core_mips.cc" ]
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000235 if (mips_float_abi == "hard") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000236 sources += [
peah8df5d4f2016-02-23 14:34:59 -0800237 "aec/aec_core_mips.cc",
peah81b92912016-10-06 06:46:20 -0700238 "utility/ooura_fft_mips.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000239 ]
240 }
241 } else {
peah27045122016-04-10 22:38:14 -0700242 sources += [ "aecm/aecm_core_c.cc" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000243 }
244
kjellander8f4419b2016-06-02 02:09:52 -0700245 # TODO(jschuh): Bug 1348: fix this warning.
246 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000247
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000248 deps += [
xians@webrtc.orge46bc772014-10-10 08:36:56 +0000249 "../../base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000250 "../../common_audio",
251 "../../system_wrappers",
252 ]
253}
254
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000255if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000256 proto_library("audioproc_debug_proto") {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200257 sources = [
258 "debug.proto",
259 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000260
kjellander78ddd732016-02-09 08:13:06 -0800261 proto_out_dir = "webrtc/modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000262 }
263}
264
kjellander@webrtc.org72273912015-02-23 19:08:31 +0000265if (current_cpu == "x86" || current_cpu == "x64") {
kjellanderb62dbbe2016-09-23 00:38:52 -0700266 rtc_static_library("audio_processing_sse2") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000267 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800268 "aec/aec_core_sse2.cc",
peah81b92912016-10-06 06:46:20 -0700269 "utility/ooura_fft_sse2.cc",
270 "utility/ooura_fft_tables_neon_sse2.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000271 ]
272
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200273 if (is_posix) {
274 cflags = [ "-msse2" ]
275 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000276
peahf28a3892016-09-01 08:58:21 -0700277 if (apm_debug_dump) {
278 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700279 } else {
peahf28a3892016-09-01 08:58:21 -0700280 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700281 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000282 }
283}
284
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700285if (rtc_build_with_neon) {
kjellanderb62dbbe2016-09-23 00:38:52 -0700286 rtc_static_library("audio_processing_neon") {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000287 sources = [
peah8df5d4f2016-02-23 14:34:59 -0800288 "aec/aec_core_neon.cc",
peah27045122016-04-10 22:38:14 -0700289 "aecm/aecm_core_neon.cc",
andrew@webrtc.orga56a2c52014-11-26 17:01:40 +0000290 "ns/nsx_core_neon.c",
peah81b92912016-10-06 06:46:20 -0700291 "utility/ooura_fft_neon.cc",
292 "utility/ooura_fft_tables_neon_sse2.h",
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.
ehmaldonado38a21322016-09-02 04:10:34 -0700299 suppressed_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
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700312 deps = [
313 "../../common_audio",
314 ]
peahb46083e2016-05-03 07:01:18 -0700315
peahf28a3892016-09-01 08:58:21 -0700316 if (apm_debug_dump) {
317 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
peahb46083e2016-05-03 07:01:18 -0700318 } else {
peahf28a3892016-09-01 08:58:21 -0700319 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
peahb46083e2016-05-03 07:01:18 -0700320 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000321 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000322}
kjellanderfb114242016-06-13 00:19:48 -0700323
324if (rtc_include_tests) {
kjellander6ceab082016-10-28 05:44:03 -0700325 group("audio_processing_tests") {
326 testonly = true
327 public_deps = [
328 ":audioproc_f",
329 ":audioproc_test_utils",
330 ":click_annotate",
331 ":nonlinear_beamformer_test",
332 ":transient_suppression_test",
333 ":unpack_aecdump",
334 ]
335
336 if (rtc_enable_intelligibility_enhancer) {
337 public_deps += [ ":intelligibility_proc" ]
338 }
339
340 if (rtc_enable_protobuf) {
341 public_deps += [ ":audioproc_unittest_proto" ]
342 }
343 }
344
ehmaldonado38a21322016-09-02 04:10:34 -0700345 rtc_executable("unpack_aecdump") {
peahc3ec1fd2016-08-07 23:19:30 -0700346 testonly = true
347 sources = [
348 "test/unpack.cc",
349 ]
350
peahc3ec1fd2016-08-07 23:19:30 -0700351 deps = [
352 ":audio_processing",
353 ":audioproc_debug_proto",
354 ":audioproc_protobuf_utils",
355 ":audioproc_test_utils",
356 "../../common_audio",
357 "../../system_wrappers:system_wrappers_default",
358 "//third_party/gflags:gflags",
359 ]
360 } # unpack_aecdump
361
ehmaldonado38a21322016-09-02 04:10:34 -0700362 rtc_executable("audioproc_f") {
peahc3ec1fd2016-08-07 23:19:30 -0700363 testonly = true
364 sources = [
365 "test/aec_dump_based_simulator.cc",
366 "test/aec_dump_based_simulator.h",
367 "test/audio_processing_simulator.cc",
368 "test/audio_processing_simulator.h",
369 "test/audioproc_float.cc",
370 "test/wav_based_simulator.cc",
371 "test/wav_based_simulator.h",
372 ]
373
peahc3ec1fd2016-08-07 23:19:30 -0700374 deps = [
375 ":audio_processing",
376 ":audioproc_debug_proto",
377 ":audioproc_protobuf_utils",
378 ":audioproc_test_utils",
379 "../../system_wrappers",
380 "../../system_wrappers:system_wrappers_default",
381 "../../test:test_support",
382 "//testing/gtest",
383 "//third_party/gflags:gflags",
384 ]
385 } # audioproc_f
386
ehmaldonado38a21322016-09-02 04:10:34 -0700387 rtc_source_set("audioproc_test_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700388 testonly = true
389 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700390 "test/audio_buffer_tools.cc",
391 "test/audio_buffer_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800392 "test/performance_timer.cc",
393 "test/performance_timer.h",
394 "test/simulator_buffers.cc",
395 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700396 "test/test_utils.cc",
397 "test/test_utils.h",
398 ]
399
kjellanderfb114242016-06-13 00:19:48 -0700400 deps = [
401 "../../base:rtc_base_approved",
402 "../../common_audio",
403 ]
404 }
405
ehmaldonado38a21322016-09-02 04:10:34 -0700406 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700407 testonly = true
408 sources = [
409 "transient/file_utils.cc",
410 "transient/file_utils.h",
411 "transient/transient_suppression_test.cc",
412 ]
413 deps = [
414 ":audio_processing",
415 "../../system_wrappers:metrics_default",
416 "../../test:test_support",
417 "//testing/gtest",
418 "//third_party/gflags",
419 ]
kwiberg7a770e02016-08-25 02:32:43 -0700420 }
421
ehmaldonado38a21322016-09-02 04:10:34 -0700422 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700423 testonly = true
424 sources = [
425 "transient/click_annotate.cc",
426 "transient/file_utils.cc",
427 "transient/file_utils.h",
428 ]
429 deps = [
430 ":audio_processing",
431 "../../system_wrappers:metrics_default",
432 ]
433 }
434
ehmaldonado38a21322016-09-02 04:10:34 -0700435 rtc_executable("nonlinear_beamformer_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700436 testonly = true
437 sources = [
438 "beamformer/nonlinear_beamformer_test.cc",
439 ]
440 deps = [
441 ":audio_processing",
442 ":audioproc_test_utils",
443 "../../system_wrappers:metrics_default",
444 "//third_party/gflags",
445 ]
kwiberg7a770e02016-08-25 02:32:43 -0700446 }
447
peah1bcfce52016-08-26 07:16:04 -0700448 if (rtc_enable_intelligibility_enhancer) {
ehmaldonado38a21322016-09-02 04:10:34 -0700449 rtc_executable("intelligibility_proc") {
peah1bcfce52016-08-26 07:16:04 -0700450 testonly = true
451 sources = [
452 "intelligibility/test/intelligibility_proc.cc",
453 ]
454 deps = [
455 ":audio_processing",
456 ":audioproc_test_utils",
457 "../../system_wrappers:metrics_default",
458 "../../test:test_support",
459 "//testing/gtest",
460 "//third_party/gflags",
461 ]
kwiberg7a770e02016-08-25 02:32:43 -0700462 }
463 }
464
kjellanderfb114242016-06-13 00:19:48 -0700465 if (rtc_enable_protobuf) {
466 proto_library("audioproc_unittest_proto") {
467 sources = [
468 "test/unittest.proto",
469 ]
470 proto_out_dir = "webrtc/modules/audio_processing"
471 }
472
kjellanderb62dbbe2016-09-23 00:38:52 -0700473 rtc_static_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700474 sources = [
475 "test/protobuf_utils.cc",
476 "test/protobuf_utils.h",
477 ]
478
479 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700480 ":audioproc_debug_proto",
kjellanderfb114242016-06-13 00:19:48 -0700481 ]
482 }
483 }
484}