blob: ca55fec1818d33fea8058d73ccb9c6a0dc95b98c [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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../../webrtc.gni")
Kimmo Kinnunen08f6a6c2019-02-26 11:46:17 +020010if (rtc_enable_protobuf) {
Dan Minor9c686132018-01-15 10:20:00 -050011 import("//third_party/protobuf/proto_library.gni")
12}
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000013
Patrik Höglundd75c8dc2017-12-19 09:45:24 +010014config("apm_debug_dump") {
15 if (apm_debug_dump) {
16 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ]
17 } else {
18 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ]
19 }
20}
21
Mirko Bonadei86d053c2019-10-17 21:32:04 +020022rtc_library("api") {
Alessio Bazzica277b6ea2018-11-06 14:24:51 +010023 visibility = [ "*" ]
Alessio Bazzicab768e882018-11-07 14:29:54 +000024 sources = [
25 "include/audio_processing.cc",
26 "include/audio_processing.h",
27 ]
28 deps = [
29 ":audio_frame_view",
Alessio Bazzicab768e882018-11-07 14:29:54 +000030 ":audio_processing_statistics",
Sam Zackrissonab866a22020-05-07 13:07:49 +020031 "../../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +010032 "../../api:scoped_refptr",
Alessio Bazzicab768e882018-11-07 14:29:54 +000033 "../../api/audio:aec3_config",
Per Åhgren71652f42020-03-17 13:23:58 +010034 "../../api/audio:audio_frame_api",
Alessio Bazzicab768e882018-11-07 14:29:54 +000035 "../../api/audio:echo_control",
Florent Castelli4467ad72022-04-04 15:18:46 +020036 "../../rtc_base:macromagic",
Florent Castellif86f6f92022-04-05 02:54:12 +020037 "../../rtc_base:refcount",
Florent Castelli57aa81b2022-04-04 17:14:02 +020038 "../../rtc_base:stringutils",
Per Åhgrenfcbe4072019-09-15 00:27:58 +020039 "../../rtc_base/system:arch",
Per Åhgren09e9a832020-05-11 11:03:47 +020040 "../../rtc_base/system:file_wrapper",
Alessio Bazzicab768e882018-11-07 14:29:54 +000041 "../../rtc_base/system:rtc_export",
Sam Zackrisson41478c72019-10-15 10:10:26 +020042 "agc:gain_control_interface",
Alessio Bazzicab768e882018-11-07 14:29:54 +000043 ]
Ali Tofigh1fa87c42022-07-25 22:07:08 +020044 absl_deps = [
45 "//third_party/abseil-cpp/absl/strings",
46 "//third_party/abseil-cpp/absl/types:optional",
47 ]
Alessio Bazzica277b6ea2018-11-06 14:24:51 +010048}
49
Per Åhgren71652f42020-03-17 13:23:58 +010050rtc_library("audio_frame_proxies") {
51 visibility = [ "*" ]
52 sources = [
53 "include/audio_frame_proxies.cc",
54 "include/audio_frame_proxies.h",
55 ]
56 deps = [
57 ":api",
58 ":audio_frame_view",
59 "../../api/audio:audio_frame_api",
60 ]
61}
62
Mirko Bonadei86d053c2019-10-17 21:32:04 +020063rtc_library("audio_buffer") {
Per Åhgren44ce4b42019-03-05 08:40:48 +010064 visibility = [ "*" ]
Per Åhgren200feba2019-03-06 04:16:46 +010065
66 configs += [ ":apm_debug_dump" ]
67
Per Åhgren44ce4b42019-03-05 08:40:48 +010068 sources = [
Per Åhgren200feba2019-03-06 04:16:46 +010069 "audio_buffer.cc",
70 "audio_buffer.h",
71 "splitting_filter.cc",
72 "splitting_filter.h",
73 "three_band_filter_bank.cc",
74 "three_band_filter_bank.h",
75 ]
76
77 defines = []
78
79 deps = [
80 ":api",
Per Åhgren1883d3e2020-02-21 13:31:07 +010081 "../../api:array_view",
Artem Titov94b57c02019-03-21 13:35:10 +010082 "../../common_audio",
Per Åhgren200feba2019-03-06 04:16:46 +010083 "../../common_audio:common_audio_c",
84 "../../rtc_base:checks",
Per Åhgren44ce4b42019-03-05 08:40:48 +010085 ]
86}
87
Mirko Bonadei86d053c2019-10-17 21:32:04 +020088rtc_library("high_pass_filter") {
Per Åhgren0aefbf02019-08-23 21:29:17 +020089 visibility = [ "*" ]
90
91 sources = [
92 "high_pass_filter.cc",
93 "high_pass_filter.h",
94 ]
95
96 defines = []
97
98 deps = [
99 ":audio_buffer",
100 "../../api:array_view",
101 "../../rtc_base:checks",
102 "utility:cascaded_biquad_filter",
103 ]
104}
105
Per Åhgren09e9a832020-05-11 11:03:47 +0200106rtc_source_set("aec_dump_interface") {
107 visibility = [ "*" ]
108 sources = [
109 "include/aec_dump.cc",
110 "include/aec_dump.h",
111 ]
112
113 deps = [
114 ":api",
115 ":audio_frame_view",
Per Åhgren09e9a832020-05-11 11:03:47 +0200116 ]
Danil Chapovalove9041612021-02-22 12:43:39 +0100117 absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
Per Åhgren09e9a832020-05-11 11:03:47 +0200118}
119
Alessio Bazzicaf77f35b2021-10-14 10:51:40 +0200120rtc_library("gain_controller2") {
121 configs += [ ":apm_debug_dump" ]
122 sources = [
123 "gain_controller2.cc",
124 "gain_controller2.h",
125 ]
126 defines = []
127 deps = [
128 ":aec_dump_interface",
129 ":api",
130 ":apm_logging",
131 ":audio_buffer",
132 ":audio_frame_view",
133 "../../common_audio",
Alessio Bazzicaf77f35b2021-10-14 10:51:40 +0200134 "../../rtc_base:checks",
135 "../../rtc_base:logging",
136 "../../rtc_base:stringutils",
137 "../../system_wrappers:field_trial",
138 "agc2:adaptive_digital",
Alessio Bazzicab4d4ae22021-10-15 13:57:56 +0200139 "agc2:cpu_features",
Alessio Bazzicaf77f35b2021-10-14 10:51:40 +0200140 "agc2:fixed_digital",
141 "agc2:gain_applier",
Alessio Bazzicab4d4ae22021-10-15 13:57:56 +0200142 "agc2:vad_wrapper",
Alessio Bazzicaf77f35b2021-10-14 10:51:40 +0200143 ]
144}
145
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200146rtc_library("audio_processing") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000147 visibility = [ "*" ]
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100148 configs += [ ":apm_debug_dump" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000149 sources = [
Per Åhgrencc73ed32020-04-26 23:56:17 +0200150 "audio_processing_builder_impl.cc",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000151 "audio_processing_impl.cc",
152 "audio_processing_impl.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000153 "echo_control_mobile_impl.cc",
154 "echo_control_mobile_impl.h",
155 "gain_control_impl.cc",
156 "gain_control_impl.h",
peah737f4b82016-03-10 23:05:28 -0800157 "render_queue_item_verifier.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000158 ]
159
160 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200161 deps = [
Per Åhgren09e9a832020-05-11 11:03:47 +0200162 ":aec_dump_interface",
Alessio Bazzica277b6ea2018-11-06 14:24:51 +0100163 ":api",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100164 ":apm_logging",
Per Åhgren44ce4b42019-03-05 08:40:48 +0100165 ":audio_buffer",
Per Åhgren71652f42020-03-17 13:23:58 +0100166 ":audio_frame_proxies",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100167 ":audio_frame_view",
Ivo Creusen56d46092017-11-24 17:29:59 +0100168 ":audio_processing_statistics",
Alessio Bazzicaf77f35b2021-10-14 10:51:40 +0200169 ":gain_controller2",
Per Åhgren0aefbf02019-08-23 21:29:17 +0200170 ":high_pass_filter",
Sam Zackrissonb37e59d2020-04-27 08:39:33 +0200171 ":optionally_built_submodule_creators",
Sam Zackrisson0a1e65e2020-03-20 11:30:32 +0100172 ":rms_level",
kwiberg529662a2017-09-04 05:43:17 -0700173 "../../api:array_view",
Artem Titov741daaf2019-03-21 14:37:36 +0100174 "../../api:function_view",
Niels Möller105711e2022-06-14 15:48:26 +0200175 "../../api:make_ref_counted",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100176 "../../api/audio:aec3_config",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200177 "../../api/audio:audio_frame_api",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100178 "../../api/audio:echo_control",
aleloi6321b492016-12-05 01:46:09 -0800179 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100180 "../../common_audio:common_audio_c",
Mirko Bonadei146137a2020-04-21 09:56:16 +0200181 "../../common_audio/third_party/ooura:fft_size_256",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100182 "../../rtc_base:checks",
Florent Castellia30aef32022-04-19 17:47:13 +0200183 "../../rtc_base:event_tracer",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700184 "../../rtc_base:gtest_prod",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200185 "../../rtc_base:ignore_wundef",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200186 "../../rtc_base:logging",
Florent Castelli4467ad72022-04-04 15:18:46 +0200187 "../../rtc_base:macromagic",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100188 "../../rtc_base:safe_minmax",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100189 "../../rtc_base:sanitizer",
Florent Castelli1cb53832022-04-14 13:28:51 +0200190 "../../rtc_base:swap_queue",
Florent Castellidd837e22022-04-04 17:16:15 +0200191 "../../rtc_base:timeutils",
Markus Handell0df0fae2020-07-07 15:53:34 +0200192 "../../rtc_base/synchronization:mutex",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200193 "../../rtc_base/system:rtc_export",
Mirko Bonadei66e73382020-09-05 21:55:35 +0200194 "../../system_wrappers",
Alessio Bazzica0441bb62021-08-10 15:23:23 +0200195 "../../system_wrappers:denormal_disabler",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200196 "../../system_wrappers:field_trial",
197 "../../system_wrappers:metrics",
Artem Titov94b57c02019-03-21 13:35:10 +0100198 "aec3",
Per Åhgren09e9a832020-05-11 11:03:47 +0200199 "aec_dump:aec_dump",
Sam Zackrisson7219d052018-07-09 14:28:15 +0200200 "aecm:aecm_core",
Alex Loikoed8ff642018-07-06 14:54:30 +0200201 "agc",
Hanna Silen529131d2021-10-29 14:55:45 +0200202 "agc:analog_gain_stats_reporter",
Sam Zackrisson41478c72019-10-15 10:10:26 +0200203 "agc:gain_control_interface",
Per Åhgren5b139d62020-03-20 15:50:14 +0100204 "agc:legacy_agc",
Per Åhgrendb5d7282021-03-15 16:31:04 +0000205 "capture_levels_adjuster",
Per Åhgren0cbb58e2019-10-29 22:59:44 +0100206 "ns",
sazaaa42ecd2020-04-01 15:24:40 +0200207 "transient:transient_suppressor_api",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100208 "vad",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200209 ]
Alessio Bazzicaefbe3af2022-03-18 12:39:00 +0100210 absl_deps = [
211 "//third_party/abseil-cpp/absl/strings",
212 "//third_party/abseil-cpp/absl/types:optional",
213 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000214
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000215 deps += [
216 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100217 "../../common_audio:fir_filter",
218 "../../common_audio:fir_filter_factory",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000219 "../../system_wrappers",
220 ]
Per Åhgren09e9a832020-05-11 11:03:47 +0200221
222 if (rtc_enable_protobuf) {
223 deps += [ "aec_dump:aec_dump_impl" ]
224 } else {
225 deps += [ "aec_dump:null_aec_dump_factory" ]
226 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000227}
228
Sam Zackrisson03cb7e52021-12-06 15:40:04 +0100229rtc_library("residual_echo_detector") {
230 poisonous = [ "default_echo_detector" ]
231 configs += [ ":apm_debug_dump" ]
232 sources = [
233 "echo_detector/circular_buffer.cc",
234 "echo_detector/circular_buffer.h",
235 "echo_detector/mean_variance_estimator.cc",
236 "echo_detector/mean_variance_estimator.h",
237 "echo_detector/moving_max.cc",
238 "echo_detector/moving_max.h",
239 "echo_detector/normalized_covariance_estimator.cc",
240 "echo_detector/normalized_covariance_estimator.h",
241 "residual_echo_detector.cc",
242 "residual_echo_detector.h",
243 ]
244 deps = [
245 ":api",
246 ":apm_logging",
247 "../../api:array_view",
248 "../../rtc_base:checks",
249 "../../rtc_base:logging",
Sam Zackrisson03cb7e52021-12-06 15:40:04 +0100250 "../../system_wrappers:metrics",
251 ]
252 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
253}
254
Sam Zackrissonb37e59d2020-04-27 08:39:33 +0200255rtc_library("optionally_built_submodule_creators") {
256 sources = [
257 "optionally_built_submodule_creators.cc",
258 "optionally_built_submodule_creators.h",
259 ]
260 deps = [
261 "transient:transient_suppressor_api",
262 "transient:transient_suppressor_impl",
263 ]
264}
265
Sam Zackrisson0a1e65e2020-03-20 11:30:32 +0100266rtc_source_set("rms_level") {
267 visibility = [ "*" ]
Sam Zackrisson7eab0a82020-03-20 15:55:29 +0100268 sources = [
269 "rms_level.cc",
270 "rms_level.h",
271 ]
272 deps = [
273 "../../api:array_view",
274 "../../rtc_base:checks",
Sam Zackrisson7eab0a82020-03-20 15:55:29 +0100275 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200276 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Sam Zackrisson0a1e65e2020-03-20 11:30:32 +0100277}
278
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200279rtc_library("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000280 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100281 sources = [
282 "include/audio_processing_statistics.cc",
283 "include/audio_processing_statistics.h",
284 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200285 deps = [ "../../rtc_base/system:rtc_export" ]
286 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100287}
288
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100289rtc_source_set("audio_frame_view") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100290 sources = [ "include/audio_frame_view.h" ]
291 deps = [ "../../api:array_view" ]
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100292}
293
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000294if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000295 proto_library("audioproc_debug_proto") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100296 sources = [ "debug.proto" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000297
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200298 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000299 }
300}
301
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200302rtc_library("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100303 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100304 sources = [
305 "logging/apm_data_dumper.cc",
306 "logging/apm_data_dumper.h",
307 ]
308 deps = [
309 "../../api:array_view",
Artem Titov94b57c02019-03-21 13:35:10 +0100310 "../../common_audio",
Alessio Bazzica4bc60452018-11-20 12:44:15 +0100311 "../../rtc_base:checks",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200312 "../../rtc_base:stringutils",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100313 ]
Per Åhgrenc2ae4c82021-01-20 15:42:13 +0100314 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100315 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100316}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000317
kjellanderfb114242016-06-13 00:19:48 -0700318if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100319 rtc_source_set("mocks") {
320 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100321 sources = [ "include/mock_audio_processing.h" ]
Patrik Höglund62139292017-12-19 16:44:45 +0100322 deps = [
Per Åhgren09e9a832020-05-11 11:03:47 +0200323 ":aec_dump_interface",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000324 ":api",
Per Åhgren0aefbf02019-08-23 21:29:17 +0200325 ":audio_buffer",
Patrik Höglund62139292017-12-19 16:44:45 +0100326 ":audio_processing",
327 ":audio_processing_statistics",
328 "../../test:test_support",
329 ]
Ali Tofigh980ad0c2022-08-09 09:21:17 +0200330 absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
Patrik Höglund62139292017-12-19 16:44:45 +0100331 }
332
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000333 if (!build_with_chromium) {
334 group("audio_processing_tests") {
335 testonly = true
336 deps = [
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200337 ":audioproc_test_utils",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000338 "transient:click_annotate",
339 "transient:transient_suppression_test",
340 ]
341
342 if (rtc_enable_protobuf) {
343 deps += [
344 ":audioproc_unittest_proto",
345 "aec_dump:aec_dump_unittests",
346 "test/conversational_speech",
347 "test/py_quality_assessment",
348 ]
349 }
350 }
351
352 rtc_library("audio_processing_unittests") {
353 testonly = true
354
355 configs += [ ":apm_debug_dump" ]
356 sources = [
357 "audio_buffer_unittest.cc",
358 "audio_frame_view_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000359 "echo_control_mobile_unittest.cc",
360 "gain_controller2_unittest.cc",
361 "splitting_filter_unittest.cc",
362 "test/fake_recording_device_unittest.cc",
363 ]
364
365 deps = [
366 ":analog_mic_simulation",
367 ":api",
368 ":apm_logging",
369 ":audio_buffer",
370 ":audio_frame_view",
371 ":audio_processing",
372 ":audioproc_test_utils",
Alessio Bazzicaf77f35b2021-10-14 10:51:40 +0200373 ":gain_controller2",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000374 ":high_pass_filter",
375 ":mocks",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000376 "../../api:array_view",
Niels Möller105711e2022-06-14 15:48:26 +0200377 "../../api:make_ref_counted",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000378 "../../api:scoped_refptr",
379 "../../api/audio:aec3_config",
380 "../../api/audio:aec3_factory",
Sam Zackrisson03cb7e52021-12-06 15:40:04 +0100381 "../../api/audio:echo_detector_creator",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000382 "../../common_audio",
383 "../../common_audio:common_audio_c",
384 "../../rtc_base",
385 "../../rtc_base:checks",
386 "../../rtc_base:gtest_prod",
387 "../../rtc_base:ignore_wundef",
Florent Castelli4467ad72022-04-04 15:18:46 +0200388 "../../rtc_base:macromagic",
Florent Castelli45a05992022-04-14 12:18:28 +0200389 "../../rtc_base:platform_thread",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000390 "../../rtc_base:protobuf_utils",
Florent Castelli71337f32022-04-14 12:41:26 +0200391 "../../rtc_base:random",
Alessio Bazzicae4498052018-12-17 09:44:06 +0100392 "../../rtc_base:rtc_base_tests_utils",
Florent Castelli33d31fb2022-04-04 16:57:52 +0200393 "../../rtc_base:rtc_event",
Florent Castellie10a9f62022-04-04 17:04:37 +0200394 "../../rtc_base:safe_conversions",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000395 "../../rtc_base:safe_minmax",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200396 "../../rtc_base:stringutils",
Florent Castelli1cb53832022-04-14 13:28:51 +0200397 "../../rtc_base:swap_queue",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000398 "../../rtc_base:task_queue_for_test",
399 "../../rtc_base:threading",
400 "../../rtc_base/synchronization:mutex",
401 "../../rtc_base/system:arch",
402 "../../rtc_base/system:file_wrapper",
403 "../../system_wrappers",
Alessio Bazzica0441bb62021-08-10 15:23:23 +0200404 "../../system_wrappers:denormal_disabler",
Hanna Silen0c1ad292022-06-16 16:35:45 +0200405 "../../test:field_trial",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000406 "../../test:fileutils",
407 "../../test:rtc_expect_death",
408 "../../test:test_support",
409 "../audio_coding:neteq_input_audio_tools",
410 "aec_dump:mock_aec_dump_unittests",
411 "agc:agc_unittests",
412 "agc2:adaptive_digital_unittests",
413 "agc2:biquad_filter_unittests",
414 "agc2:fixed_digital_unittests",
415 "agc2:noise_estimator_unittests",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000416 "agc2:test_utils",
Alessio Bazzica585aad72021-10-08 08:15:29 +0200417 "agc2:vad_wrapper_unittests",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000418 "agc2/rnn_vad:unittests",
Per Åhgrendb5d7282021-03-15 16:31:04 +0000419 "capture_levels_adjuster",
420 "capture_levels_adjuster:capture_levels_adjuster_unittests",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000421 "test/conversational_speech:unittest",
422 "transient:transient_suppression_unittests",
423 "utility:legacy_delay_estimator_unittest",
424 "utility:pffft_wrapper_unittest",
425 "vad:vad_unittests",
426 "//testing/gtest",
ehmaldonado36268652017-01-19 08:27:11 -0800427 ]
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000428 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
429
430 defines = []
431
432 if (rtc_prefer_fixed_point) {
433 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
434 } else {
435 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
436 }
437
438 if (rtc_enable_protobuf) {
439 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
440 deps += [
441 ":audioproc_debug_proto",
442 ":audioproc_protobuf_utils",
443 ":audioproc_test_utils",
444 ":audioproc_unittest_proto",
445 ":optionally_built_submodule_creators",
Sam Zackrisson03cb7e52021-12-06 15:40:04 +0100446 ":residual_echo_detector",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000447 ":rms_level",
448 ":runtime_settings_protobuf_utils",
449 "../../api/audio:audio_frame_api",
450 "../../api/audio:echo_control",
451 "../../rtc_base:rtc_base_tests_utils",
452 "../../rtc_base:rtc_task_queue",
453 "aec_dump",
454 "aec_dump:aec_dump_unittests",
455 ]
456 absl_deps += [ "//third_party/abseil-cpp/absl/flags:flag" ]
457 sources += [
458 "audio_processing_impl_locking_unittest.cc",
459 "audio_processing_impl_unittest.cc",
460 "audio_processing_unittest.cc",
461 "echo_control_mobile_bit_exact_unittest.cc",
462 "echo_detector/circular_buffer_unittest.cc",
463 "echo_detector/mean_variance_estimator_unittest.cc",
464 "echo_detector/moving_max_unittest.cc",
465 "echo_detector/normalized_covariance_estimator_unittest.cc",
466 "gain_control_unittest.cc",
467 "high_pass_filter_unittest.cc",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000468 "residual_echo_detector_unittest.cc",
469 "rms_level_unittest.cc",
470 "test/debug_dump_replayer.cc",
471 "test/debug_dump_replayer.h",
472 "test/debug_dump_test.cc",
473 "test/echo_canceller_test_tools.cc",
474 "test/echo_canceller_test_tools.h",
475 "test/echo_canceller_test_tools_unittest.cc",
476 "test/echo_control_mock.h",
477 "test/test_utils.h",
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000478 ]
479 }
ehmaldonado36268652017-01-19 08:27:11 -0800480 }
ehmaldonado36268652017-01-19 08:27:11 -0800481 }
482
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200483 rtc_library("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800484 testonly = true
saza1d600522019-10-18 13:29:43 +0200485 configs += [ ":apm_debug_dump" ]
kjellandere0629c02017-04-25 04:04:50 -0700486
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100487 sources = [ "audio_processing_performance_unittest.cc" ]
ehmaldonado021eef32017-01-05 07:09:50 -0800488 deps = [
489 ":audio_processing",
490 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100491 "../../api:array_view",
Florent Castelli45a05992022-04-14 12:18:28 +0200492 "../../rtc_base:platform_thread",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700493 "../../rtc_base:protobuf_utils",
Florent Castelli71337f32022-04-14 12:41:26 +0200494 "../../rtc_base:random",
Florent Castelli33d31fb2022-04-04 16:57:52 +0200495 "../../rtc_base:rtc_event",
Florent Castellie10a9f62022-04-04 17:04:37 +0200496 "../../rtc_base:safe_conversions",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100497 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100498 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100499 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800500 ]
ehmaldonado021eef32017-01-05 07:09:50 -0800501 }
502
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200503 rtc_library("analog_mic_simulation") {
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200504 sources = [
505 "test/fake_recording_device.cc",
506 "test/fake_recording_device.h",
507 ]
508 deps = [
509 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200510 "../../api/audio:audio_frame_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100511 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100512 "../../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200513 "../../rtc_base:logging",
Florent Castellie10a9f62022-04-04 17:04:37 +0200514 "../../rtc_base:safe_conversions",
Alex Loiko5c71e742018-07-02 11:37:47 +0200515 "../../rtc_base:safe_minmax",
Alex Loikoed8ff642018-07-06 14:54:30 +0200516 "agc:gain_map",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200517 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200518 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200519 }
520
Andrey Logvine7c79fd2021-02-01 09:56:37 +0000521 if (rtc_enable_protobuf && !build_with_chromium) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200522 rtc_library("audioproc_f_impl") {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800523 testonly = true
Per Åhgren7a95e0f2018-10-25 09:56:49 +0200524 configs += [ ":apm_debug_dump" ]
ehmaldonado1fd08c12017-01-17 02:37:34 -0800525 sources = [
526 "test/aec_dump_based_simulator.cc",
527 "test/aec_dump_based_simulator.h",
Per Åhgrenada9b892019-04-03 16:06:42 +0200528 "test/api_call_statistics.cc",
529 "test/api_call_statistics.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800530 "test/audio_processing_simulator.cc",
531 "test/audio_processing_simulator.h",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100532 "test/audioproc_float_impl.cc",
533 "test/audioproc_float_impl.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800534 "test/wav_based_simulator.cc",
535 "test/wav_based_simulator.h",
536 ]
peahc3ec1fd2016-08-07 23:19:30 -0700537
ehmaldonado1fd08c12017-01-17 02:37:34 -0800538 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200539 ":analog_mic_simulation",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000540 ":api",
Per Åhgren7a95e0f2018-10-25 09:56:49 +0200541 ":apm_logging",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800542 ":audio_processing",
543 ":audioproc_debug_proto",
544 ":audioproc_protobuf_utils",
545 ":audioproc_test_utils",
Alex Loiko62347222018-09-10 10:18:07 +0200546 ":runtime_settings_protobuf_utils",
Sam Zackrissona4c85142018-10-10 10:44:43 +0200547 "../../api/audio:aec3_config_json",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100548 "../../api/audio:aec3_factory",
Sam Zackrisson03cb7e52021-12-06 15:40:04 +0100549 "../../api/audio:echo_detector_creator",
Artem Titov94b57c02019-03-21 13:35:10 +0100550 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100551 "../../rtc_base:checks",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200552 "../../rtc_base:ignore_wundef",
Florent Castelli0af55ba2022-04-04 15:06:30 +0200553 "../../rtc_base:logging",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700554 "../../rtc_base:protobuf_utils",
Per Åhgrenad09d742018-03-08 07:47:14 +0100555 "../../rtc_base:rtc_json",
Florent Castellie10a9f62022-04-04 17:04:37 +0200556 "../../rtc_base:safe_conversions",
Florent Castelli57aa81b2022-04-04 17:14:02 +0200557 "../../rtc_base:stringutils",
Danil Chapovalov07122bc2019-03-26 14:37:01 +0100558 "../../rtc_base:task_queue_for_test",
Florent Castellidd837e22022-04-04 17:16:15 +0200559 "../../rtc_base:timeutils",
Mirko Bonadeif1df04b2020-03-23 19:53:23 +0100560 "../../rtc_base/system:file_wrapper",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800561 "../../system_wrappers",
saza0cf99ce2020-04-01 17:42:01 +0200562 "../../system_wrappers:field_trial",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800563 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700564 "aec_dump",
565 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800566 "//testing/gtest",
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200567 ]
568 absl_deps = [
Mirko Bonadei2ab97f62019-07-18 13:44:12 +0200569 "//third_party/abseil-cpp/absl/flags:flag",
570 "//third_party/abseil-cpp/absl/flags:parse",
Alessio Bazzica68170382018-11-20 12:27:20 +0100571 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200572 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800573 ]
Ivo Creusen8c812f32018-03-09 17:33:04 +0100574 } # audioproc_f_impl
ehmaldonado1fd08c12017-01-17 02:37:34 -0800575 }
peahc3ec1fd2016-08-07 23:19:30 -0700576
kjellanderfb114242016-06-13 00:19:48 -0700577 if (rtc_enable_protobuf) {
578 proto_library("audioproc_unittest_proto") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100579 sources = [ "test/unittest.proto" ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200580 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700581 }
582
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200583 rtc_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700584 sources = [
585 "test/protobuf_utils.cc",
586 "test/protobuf_utils.h",
587 ]
588
589 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700590 ":audioproc_debug_proto",
Alex Loiko62347222018-09-10 10:18:07 +0200591 "../../rtc_base:checks",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200592 "../../rtc_base:ignore_wundef",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700593 "../../rtc_base:protobuf_utils",
Niels Möllera12c42a2018-07-25 16:05:48 +0200594 "../../rtc_base/system:arch",
kjellanderfb114242016-06-13 00:19:48 -0700595 ]
596 }
Alex Loiko62347222018-09-10 10:18:07 +0200597
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200598 rtc_library("runtime_settings_protobuf_utils") {
Alex Loiko62347222018-09-10 10:18:07 +0200599 testonly = true
600 sources = [
601 "test/runtime_setting_util.cc",
602 "test/runtime_setting_util.h",
603 ]
604
605 deps = [
Alessio Bazzicab768e882018-11-07 14:29:54 +0000606 ":api",
Alex Loiko62347222018-09-10 10:18:07 +0200607 ":audioproc_debug_proto",
608 ":audioproc_protobuf_utils",
609 "../../rtc_base:checks",
610 ]
611 }
kjellanderfb114242016-06-13 00:19:48 -0700612 }
613}
Per Åhgrencc73ed32020-04-26 23:56:17 +0200614
615rtc_library("audioproc_test_utils") {
616 visibility = [ "*" ]
617 testonly = true
618 sources = [
619 "test/audio_buffer_tools.cc",
620 "test/audio_buffer_tools.h",
621 "test/audio_processing_builder_for_testing.cc",
622 "test/audio_processing_builder_for_testing.h",
623 "test/bitexactness_tools.cc",
624 "test/bitexactness_tools.h",
625 "test/performance_timer.cc",
626 "test/performance_timer.h",
627 "test/simulator_buffers.cc",
628 "test/simulator_buffers.h",
629 "test/test_utils.cc",
630 "test/test_utils.h",
631 ]
632
633 configs += [ ":apm_debug_dump" ]
634
635 deps = [
636 ":api",
637 ":audio_buffer",
638 ":audio_processing",
639 "../../api:array_view",
640 "../../api/audio:audio_frame_api",
641 "../../common_audio",
642 "../../rtc_base:checks",
Florent Castelli71337f32022-04-14 12:41:26 +0200643 "../../rtc_base:random",
Per Åhgrencc73ed32020-04-26 23:56:17 +0200644 "../../rtc_base/system:arch",
645 "../../system_wrappers",
646 "../../test:fileutils",
647 "../../test:test_support",
648 "../audio_coding:neteq_input_audio_tools",
649 "//testing/gtest",
Per Åhgrencc73ed32020-04-26 23:56:17 +0200650 ]
Mirko Bonadei2dcf3482020-06-05 14:30:41 +0200651 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
Per Åhgrencc73ed32020-04-26 23:56:17 +0200652}