blob: b238a9f8fb7dc4b3cfced100ab3cd1aa78cf9bed [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("config") {
Alessio Bazzica277b6ea2018-11-06 14:24:51 +010023 visibility = [ ":*" ]
24 sources = [
25 "include/config.cc",
26 "include/config.h",
27 ]
28 deps = [
29 "../../rtc_base:macromagic",
30 "../../rtc_base/system:rtc_export",
31 ]
32}
33
Mirko Bonadei86d053c2019-10-17 21:32:04 +020034rtc_library("api") {
Alessio Bazzica277b6ea2018-11-06 14:24:51 +010035 visibility = [ "*" ]
Alessio Bazzicab768e882018-11-07 14:29:54 +000036 sources = [
37 "include/audio_processing.cc",
38 "include/audio_processing.h",
39 ]
40 deps = [
41 ":audio_frame_view",
42 ":audio_generator_interface",
43 ":audio_processing_statistics",
44 ":config",
Mirko Bonadeid9708072019-01-25 20:26:48 +010045 "../../api:scoped_refptr",
Alessio Bazzicab768e882018-11-07 14:29:54 +000046 "../../api/audio:aec3_config",
47 "../../api/audio:echo_control",
48 "../../rtc_base:deprecation",
49 "../../rtc_base:macromagic",
Alessio Bazzicab768e882018-11-07 14:29:54 +000050 "../../rtc_base:rtc_base_approved",
Per Åhgrenfcbe4072019-09-15 00:27:58 +020051 "../../rtc_base/system:arch",
Alessio Bazzicab768e882018-11-07 14:29:54 +000052 "../../rtc_base/system:rtc_export",
Sam Zackrisson41478c72019-10-15 10:10:26 +020053 "agc:gain_control_interface",
Alessio Bazzicab768e882018-11-07 14:29:54 +000054 "//third_party/abseil-cpp/absl/types:optional",
55 ]
Alessio Bazzica277b6ea2018-11-06 14:24:51 +010056}
57
Mirko Bonadei86d053c2019-10-17 21:32:04 +020058rtc_library("audio_buffer") {
Per Åhgren44ce4b42019-03-05 08:40:48 +010059 visibility = [ "*" ]
Per Åhgren200feba2019-03-06 04:16:46 +010060
61 configs += [ ":apm_debug_dump" ]
62
Per Åhgren44ce4b42019-03-05 08:40:48 +010063 sources = [
Per Åhgren200feba2019-03-06 04:16:46 +010064 "audio_buffer.cc",
65 "audio_buffer.h",
66 "splitting_filter.cc",
67 "splitting_filter.h",
68 "three_band_filter_bank.cc",
69 "three_band_filter_bank.h",
70 ]
71
72 defines = []
73
74 deps = [
75 ":api",
76 "../../api/audio:audio_frame_api",
Artem Titov94b57c02019-03-21 13:35:10 +010077 "../../common_audio",
Per Åhgren200feba2019-03-06 04:16:46 +010078 "../../common_audio:common_audio_c",
79 "../../rtc_base:checks",
Per Åhgren44ce4b42019-03-05 08:40:48 +010080 ]
81}
82
Mirko Bonadei86d053c2019-10-17 21:32:04 +020083rtc_library("high_pass_filter") {
Per Åhgren0aefbf02019-08-23 21:29:17 +020084 visibility = [ "*" ]
85
86 sources = [
87 "high_pass_filter.cc",
88 "high_pass_filter.h",
89 ]
90
91 defines = []
92
93 deps = [
94 ":audio_buffer",
95 "../../api:array_view",
96 "../../rtc_base:checks",
97 "utility:cascaded_biquad_filter",
98 ]
99}
100
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200101rtc_library("audio_processing") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000102 visibility = [ "*" ]
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100103 configs += [ ":apm_debug_dump" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000104 sources = [
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105 "audio_processing_impl.cc",
106 "audio_processing_impl.h",
107 "common.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000108 "echo_control_mobile_impl.cc",
109 "echo_control_mobile_impl.h",
ivocaf27ed02016-10-28 07:04:03 -0700110 "echo_detector/circular_buffer.cc",
111 "echo_detector/circular_buffer.h",
112 "echo_detector/mean_variance_estimator.cc",
113 "echo_detector/mean_variance_estimator.h",
ivoc4e477a12017-01-15 08:29:46 -0800114 "echo_detector/moving_max.cc",
115 "echo_detector/moving_max.h",
ivocaf27ed02016-10-28 07:04:03 -0700116 "echo_detector/normalized_covariance_estimator.cc",
117 "echo_detector/normalized_covariance_estimator.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000118 "gain_control_impl.cc",
119 "gain_control_impl.h",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100120 "gain_controller2.cc",
121 "gain_controller2.h",
Alex Loiko1aec5942018-05-15 13:13:22 +0200122 "include/aec_dump.cc",
123 "include/aec_dump.h",
saza6787f232019-10-11 19:31:07 +0200124 "level_estimator.cc",
125 "level_estimator.h",
peah737f4b82016-03-10 23:05:28 -0800126 "render_queue_item_verifier.h",
ivoc9f4a4a02016-10-28 05:39:16 -0700127 "residual_echo_detector.cc",
128 "residual_echo_detector.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000129 "rms_level.cc",
130 "rms_level.h",
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000131 "transient/common.h",
132 "transient/daubechies_8_wavelet_coeffs.h",
133 "transient/dyadic_decimator.h",
134 "transient/moving_moments.cc",
135 "transient/moving_moments.h",
136 "transient/transient_detector.cc",
137 "transient/transient_detector.h",
138 "transient/transient_suppressor.cc",
139 "transient/transient_suppressor.h",
140 "transient/wpd_node.cc",
141 "transient/wpd_node.h",
142 "transient/wpd_tree.cc",
143 "transient/wpd_tree.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000144 "typing_detection.cc",
145 "typing_detection.h",
Sam Zackrisson0824c6f2019-10-07 14:03:56 +0200146 "voice_detection.cc",
147 "voice_detection.h",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000148 ]
149
150 defines = []
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200151 deps = [
Alessio Bazzica277b6ea2018-11-06 14:24:51 +0100152 ":api",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100153 ":apm_logging",
Per Åhgren44ce4b42019-03-05 08:40:48 +0100154 ":audio_buffer",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100155 ":audio_frame_view",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100156 ":audio_generator_interface",
Ivo Creusen56d46092017-11-24 17:29:59 +0100157 ":audio_processing_statistics",
Alessio Bazzica277b6ea2018-11-06 14:24:51 +0100158 ":config",
Per Åhgren0aefbf02019-08-23 21:29:17 +0200159 ":high_pass_filter",
kwiberg529662a2017-09-04 05:43:17 -0700160 "../../api:array_view",
Artem Titov741daaf2019-03-21 14:37:36 +0100161 "../../api:function_view",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100162 "../../api/audio:aec3_config",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200163 "../../api/audio:audio_frame_api",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100164 "../../api/audio:echo_control",
aleloi6321b492016-12-05 01:46:09 -0800165 "../../audio/utility:audio_frame_operations",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100166 "../../common_audio:common_audio_c",
Artem Titov94b57c02019-03-21 13:35:10 +0100167 "../../common_audio/third_party/fft4g",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100168 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100169 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700170 "../../rtc_base:gtest_prod",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200171 "../../rtc_base:ignore_wundef",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100172 "../../rtc_base:safe_minmax",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100173 "../../rtc_base:sanitizer",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200174 "../../rtc_base/system:rtc_export",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100175 "../../system_wrappers:cpu_features_api",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200176 "../../system_wrappers:field_trial",
177 "../../system_wrappers:metrics",
Artem Titov94b57c02019-03-21 13:35:10 +0100178 "aec3",
Sam Zackrisson7219d052018-07-09 14:28:15 +0200179 "aecm:aecm_core",
Alex Loikoed8ff642018-07-06 14:54:30 +0200180 "agc",
181 "agc:agc_legacy_c",
Sam Zackrisson41478c72019-10-15 10:10:26 +0200182 "agc:gain_control_interface",
Alex Loiko2bac8962018-03-27 13:38:36 +0200183 "agc2:adaptive_digital",
184 "agc2:fixed_digital",
Alex Loikob5c9a792018-04-16 16:31:22 +0200185 "agc2:gain_applier",
Per Åhgren95059e02019-12-13 15:05:48 +0100186 "legacy_ns:legacy_ns",
187 "legacy_ns:legacy_ns_c",
Per Åhgren0cbb58e2019-10-29 22:59:44 +0100188 "ns",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100189 "vad",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200190 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200191 ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000192
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000193 deps += [
194 "../../common_audio",
Patrik Höglundf715c532017-11-17 11:04:15 +0100195 "../../common_audio:fir_filter",
196 "../../common_audio:fir_filter_factory",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700197 "../../rtc_base:rtc_base_approved",
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000198 "../../system_wrappers",
199 ]
200}
201
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200202rtc_library("audio_processing_statistics") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000203 visibility = [ "*" ]
Ivo Creusen56d46092017-11-24 17:29:59 +0100204 sources = [
205 "include/audio_processing_statistics.cc",
206 "include/audio_processing_statistics.h",
207 ]
208 deps = [
Mirko Bonadei3d255302018-10-11 10:50:45 +0200209 "../../rtc_base/system:rtc_export",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200210 "//third_party/abseil-cpp/absl/types:optional",
Ivo Creusen56d46092017-11-24 17:29:59 +0100211 ]
212}
213
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100214rtc_source_set("audio_frame_view") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100215 sources = [ "include/audio_frame_view.h" ]
216 deps = [ "../../api:array_view" ]
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100217}
218
Sam Zackrisson4d364492018-03-02 16:03:21 +0100219rtc_source_set("audio_generator_interface") {
220 visibility = [ "*" ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100221 sources = [ "include/audio_generator.h" ]
Sam Zackrisson4d364492018-03-02 16:03:21 +0100222 deps = [
223 ":audio_frame_view",
224 "../../rtc_base:rtc_base_approved",
Artem Titov94b57c02019-03-21 13:35:10 +0100225 "../../system_wrappers",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100226 ]
227}
228
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200229rtc_library("audio_generator_factory") {
Sam Zackrisson4d364492018-03-02 16:03:21 +0100230 visibility = [ "*" ]
Niels Möller74cebb32019-07-30 11:55:36 +0200231 testonly = true
Sam Zackrisson4d364492018-03-02 16:03:21 +0100232 sources = [
233 "include/audio_generator_factory.cc",
234 "include/audio_generator_factory.h",
235 ]
236 deps = [
237 ":audio_generator_interface",
238 ":file_audio_generator",
Artem Titov94b57c02019-03-21 13:35:10 +0100239 "../../common_audio",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100240 "../../rtc_base:rtc_base_approved",
Artem Titov94b57c02019-03-21 13:35:10 +0100241 "../../system_wrappers",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100242 ]
243}
244
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200245rtc_library("file_audio_generator") {
Sam Zackrisson4d364492018-03-02 16:03:21 +0100246 sources = [
247 "audio_generator/file_audio_generator.cc",
248 "audio_generator/file_audio_generator.h",
249 ]
250 deps = [
251 ":audio_generator_interface",
Artem Titov94b57c02019-03-21 13:35:10 +0100252 "../../common_audio",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100253 "../../rtc_base:rtc_base_approved",
Artem Titov94b57c02019-03-21 13:35:10 +0100254 "../../system_wrappers",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100255 ]
256}
257
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000258if (rtc_enable_protobuf) {
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000259 proto_library("audioproc_debug_proto") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100260 sources = [ "debug.proto" ]
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000261
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200262 proto_out_dir = "modules/audio_processing"
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000263 }
264}
265
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200266rtc_library("apm_logging") {
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100267 configs += [ ":apm_debug_dump" ]
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100268 sources = [
269 "logging/apm_data_dumper.cc",
270 "logging/apm_data_dumper.h",
271 ]
272 deps = [
273 "../../api:array_view",
Artem Titov94b57c02019-03-21 13:35:10 +0100274 "../../common_audio",
Alessio Bazzica4bc60452018-11-20 12:44:15 +0100275 "../../rtc_base:checks",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100276 "../../rtc_base:rtc_base_approved",
277 ]
278 defines = []
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100279}
Patrik Höglunda36d0e22017-12-04 10:11:11 +0000280
kjellanderfb114242016-06-13 00:19:48 -0700281if (rtc_include_tests) {
Patrik Höglund62139292017-12-19 16:44:45 +0100282 rtc_source_set("mocks") {
283 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100284 sources = [ "include/mock_audio_processing.h" ]
Patrik Höglund62139292017-12-19 16:44:45 +0100285 deps = [
Alessio Bazzicab768e882018-11-07 14:29:54 +0000286 ":api",
Per Åhgren0aefbf02019-08-23 21:29:17 +0200287 ":audio_buffer",
Patrik Höglund62139292017-12-19 16:44:45 +0100288 ":audio_processing",
289 ":audio_processing_statistics",
290 "../../test:test_support",
291 ]
292 }
293
kjellander6ceab082016-10-28 05:44:03 -0700294 group("audio_processing_tests") {
295 testonly = true
Mirko Bonadei10679932017-12-05 15:07:16 +0100296 deps = [
kjellander6ceab082016-10-28 05:44:03 -0700297 ":audioproc_test_utils",
298 ":click_annotate",
kjellander6ceab082016-10-28 05:44:03 -0700299 ":transient_suppression_test",
kjellander6ceab082016-10-28 05:44:03 -0700300 ]
301
kjellander6ceab082016-10-28 05:44:03 -0700302 if (rtc_enable_protobuf) {
Mirko Bonadei10679932017-12-05 15:07:16 +0100303 deps += [
ehmaldonado1fd08c12017-01-17 02:37:34 -0800304 ":audioproc_unittest_proto",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200305 "aec_dump:aec_dump_unittests",
alessiob5f32aca2017-03-18 02:29:13 -0700306 "test/conversational_speech",
alessiob306d1bf2017-02-24 05:32:21 -0800307 "test/py_quality_assessment",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800308 ]
kjellander6ceab082016-10-28 05:44:03 -0700309 }
310 }
311
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200312 rtc_library("audio_processing_unittests") {
ehmaldonado36268652017-01-19 08:27:11 -0800313 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700314
Patrik Höglundd75c8dc2017-12-19 09:45:24 +0100315 configs += [ ":apm_debug_dump" ]
ehmaldonado36268652017-01-19 08:27:11 -0800316 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800317 "audio_buffer_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100318 "audio_frame_view_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800319 "config_unittest.cc",
Sam Zackrisson8c147b62018-09-28 12:40:47 +0200320 "echo_control_mobile_unittest.cc",
Alex Loiko153f11e2018-02-16 12:39:00 +0100321 "gain_controller2_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800322 "splitting_filter_unittest.cc",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200323 "test/fake_recording_device_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800324 "transient/dyadic_decimator_unittest.cc",
325 "transient/file_utils.cc",
326 "transient/file_utils.h",
327 "transient/file_utils_unittest.cc",
328 "transient/moving_moments_unittest.cc",
329 "transient/transient_detector_unittest.cc",
330 "transient/transient_suppressor_unittest.cc",
331 "transient/wpd_node_unittest.cc",
332 "transient/wpd_tree_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800333 ]
334
335 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200336 ":analog_mic_simulation",
Alessio Bazzica277b6ea2018-11-06 14:24:51 +0100337 ":api",
Patrik Höglunde6ffc422017-12-11 10:28:16 +0100338 ":apm_logging",
Per Åhgren44ce4b42019-03-05 08:40:48 +0100339 ":audio_buffer",
Alex Loiko153f11e2018-02-16 12:39:00 +0100340 ":audio_frame_view",
ehmaldonado36268652017-01-19 08:27:11 -0800341 ":audio_processing",
ehmaldonado36268652017-01-19 08:27:11 -0800342 ":audioproc_test_utils",
Alessio Bazzica277b6ea2018-11-06 14:24:51 +0100343 ":config",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100344 ":file_audio_generator_unittests",
Per Åhgren0aefbf02019-08-23 21:29:17 +0200345 ":high_pass_filter",
Patrik Höglund62139292017-12-19 16:44:45 +0100346 ":mocks",
kwiberg529662a2017-09-04 05:43:17 -0700347 "../../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100348 "../../api:scoped_refptr",
Gustaf Ullberg2ae140a2018-02-16 13:43:49 +0100349 "../../api/audio:aec3_config",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100350 "../../api/audio:aec3_factory",
Artem Titov94b57c02019-03-21 13:35:10 +0100351 "../../common_audio",
Mirko Bonadeidbbb33c2018-02-05 15:50:41 +0100352 "../../common_audio:common_audio_c",
Artem Titov94b57c02019-03-21 13:35:10 +0100353 "../../rtc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100354 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700355 "../../rtc_base:gtest_prod",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200356 "../../rtc_base:ignore_wundef",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700357 "../../rtc_base:protobuf_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700358 "../../rtc_base:rtc_base_approved",
Mirko Bonadeie3abb812018-11-23 13:15:08 +0100359 "../../rtc_base:rtc_base_tests_utils",
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100360 "../../rtc_base:safe_minmax",
Danil Chapovalov07122bc2019-03-26 14:37:01 +0100361 "../../rtc_base:task_queue_for_test",
Niels Möllera12c42a2018-07-25 16:05:48 +0200362 "../../rtc_base/system:arch",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100363 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100364 "../../system_wrappers",
365 "../../system_wrappers:cpu_features_api",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100366 "../../test:fileutils",
Artem Titov9dc209a2019-11-28 17:09:30 +0100367 "../../test:rtc_expect_death",
ehmaldonado36268652017-01-19 08:27:11 -0800368 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200369 "../audio_coding:neteq_input_audio_tools",
aleloi20e4a732017-06-08 08:12:46 -0700370 "aec_dump:mock_aec_dump_unittests",
Alex Loikoed8ff642018-07-06 14:54:30 +0200371 "agc:agc_unittests",
Alex Loiko1e48e802018-03-28 09:45:29 +0200372 "agc2:adaptive_digital_unittests",
Alessio Bazzicad8d02142018-05-07 13:26:47 +0200373 "agc2:biquad_filter_unittests",
Alex Loikoe36e8bb2018-02-16 11:54:07 +0100374 "agc2:fixed_digital_unittests",
Alex Loiko4ed47d02018-04-04 15:05:57 +0200375 "agc2:noise_estimator_unittests",
Alessio Bazzica1e2542f2018-11-13 14:44:15 +0100376 "agc2:rnn_vad_with_level_unittests",
Alessio Bazzica3e4c77f2018-11-01 21:31:38 +0100377 "agc2:test_utils",
Alessio Bazzica4736d4e2018-04-17 16:46:45 +0200378 "agc2/rnn_vad:unittests",
Per Åhgren95059e02019-12-13 15:05:48 +0100379 "legacy_ns:legacy_ns",
alessiob4b6463c2017-03-23 05:17:06 -0700380 "test/conversational_speech:unittest",
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200381 "utility:legacy_delay_estimator_unittest",
Alessio Bazzicacaa499b2019-02-21 17:35:43 +0100382 "utility:pffft_wrapper_unittest",
Alex Loiko0488fcf2018-02-05 11:15:23 +0100383 "vad:vad_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800384 "//testing/gtest",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200385 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado36268652017-01-19 08:27:11 -0800386 ]
387
388 defines = []
389
ehmaldonado36268652017-01-19 08:27:11 -0800390 if (rtc_prefer_fixed_point) {
391 defines += [ "WEBRTC_AUDIOPROC_FIXED_PROFILE" ]
392 } else {
393 defines += [ "WEBRTC_AUDIOPROC_FLOAT_PROFILE" ]
394 }
395
396 if (rtc_enable_protobuf) {
397 defines += [ "WEBRTC_AUDIOPROC_DEBUG_DUMP" ]
398 deps += [
ehmaldonadof49ff262017-01-23 04:26:02 -0800399 ":audioproc_debug_proto",
ehmaldonado36268652017-01-19 08:27:11 -0800400 ":audioproc_protobuf_utils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200401 ":audioproc_test_utils",
ehmaldonado36268652017-01-19 08:27:11 -0800402 ":audioproc_unittest_proto",
Alex Loiko62347222018-09-10 10:18:07 +0200403 ":runtime_settings_protobuf_utils",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200404 "../../api/audio:audio_frame_api",
Alessio Bazzicae4498052018-12-17 09:44:06 +0100405 "../../api/audio:echo_control",
406 "../../rtc_base:rtc_base_tests_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700407 "../../rtc_base:rtc_task_queue",
aleloif4dd1912017-06-15 01:55:38 -0700408 "aec_dump",
409 "aec_dump:aec_dump_unittests",
Sam Zackrisson6558fa52019-08-26 10:12:41 +0200410 "//third_party/abseil-cpp/absl/flags:flag",
ehmaldonado36268652017-01-19 08:27:11 -0800411 ]
412 sources += [
ehmaldonado36268652017-01-19 08:27:11 -0800413 "audio_processing_impl_locking_unittest.cc",
414 "audio_processing_impl_unittest.cc",
415 "audio_processing_unittest.cc",
Sam Zackrisson8c147b62018-09-28 12:40:47 +0200416 "echo_control_mobile_bit_exact_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800417 "echo_detector/circular_buffer_unittest.cc",
418 "echo_detector/mean_variance_estimator_unittest.cc",
419 "echo_detector/moving_max_unittest.cc",
420 "echo_detector/normalized_covariance_estimator_unittest.cc",
421 "gain_control_unittest.cc",
Per Åhgren0aefbf02019-08-23 21:29:17 +0200422 "high_pass_filter_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800423 "level_estimator_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800424 "residual_echo_detector_unittest.cc",
425 "rms_level_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800426 "test/debug_dump_replayer.cc",
427 "test/debug_dump_replayer.h",
428 "test/debug_dump_test.cc",
peah69221db2017-01-27 03:28:19 -0800429 "test/echo_canceller_test_tools.cc",
430 "test/echo_canceller_test_tools.h",
431 "test/echo_canceller_test_tools_unittest.cc",
Alessio Bazzicae4498052018-12-17 09:44:06 +0100432 "test/echo_control_mock.h",
ehmaldonado36268652017-01-19 08:27:11 -0800433 "test/test_utils.h",
434 "voice_detection_unittest.cc",
435 ]
436 }
ehmaldonado36268652017-01-19 08:27:11 -0800437 }
438
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200439 rtc_library("audio_processing_perf_tests") {
ehmaldonado021eef32017-01-05 07:09:50 -0800440 testonly = true
saza1d600522019-10-18 13:29:43 +0200441 configs += [ ":apm_debug_dump" ]
kjellandere0629c02017-04-25 04:04:50 -0700442
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100443 sources = [ "audio_processing_performance_unittest.cc" ]
ehmaldonado021eef32017-01-05 07:09:50 -0800444 deps = [
445 ":audio_processing",
446 ":audioproc_test_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100447 "../../api:array_view",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700448 "../../rtc_base:protobuf_utils",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100449 "../../rtc_base:rtc_base_approved",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100450 "../../system_wrappers",
Edward Lemure66572b2018-01-05 15:34:09 +0100451 "../../test:perf_test",
Ivo Creusen69d276d2017-11-24 15:35:57 +0100452 "../../test:test_support",
ehmaldonado021eef32017-01-05 07:09:50 -0800453 ]
ehmaldonado021eef32017-01-05 07:09:50 -0800454 }
455
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200456 rtc_library("file_audio_generator_unittests") {
Sam Zackrisson4d364492018-03-02 16:03:21 +0100457 testonly = true
458
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100459 sources = [ "audio_generator/file_audio_generator_unittest.cc" ]
Sam Zackrisson4d364492018-03-02 16:03:21 +0100460
461 deps = [
Alessio Bazzicab768e882018-11-07 14:29:54 +0000462 ":api",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100463 ":audio_generator_factory",
464 ":audio_processing",
465 ":file_audio_generator",
466 "../../rtc_base:rtc_base_approved",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100467 "../../test:fileutils",
Sam Zackrisson4d364492018-03-02 16:03:21 +0100468 "../../test:test_support",
469 ]
470 }
471
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200472 rtc_library("analog_mic_simulation") {
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200473 sources = [
474 "test/fake_recording_device.cc",
475 "test/fake_recording_device.h",
476 ]
477 deps = [
478 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200479 "../../api/audio:audio_frame_api",
Artem Titov94b57c02019-03-21 13:35:10 +0100480 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100481 "../../rtc_base:checks",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200482 "../../rtc_base:rtc_base_approved",
Alex Loiko5c71e742018-07-02 11:37:47 +0200483 "../../rtc_base:safe_minmax",
Alex Loikoed8ff642018-07-06 14:54:30 +0200484 "agc:gain_map",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200485 "//third_party/abseil-cpp/absl/types:optional",
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200486 ]
487 }
488
ehmaldonado1fd08c12017-01-17 02:37:34 -0800489 if (rtc_enable_protobuf) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200490 rtc_library("audioproc_f_impl") {
ehmaldonado1fd08c12017-01-17 02:37:34 -0800491 testonly = true
Per Åhgren7a95e0f2018-10-25 09:56:49 +0200492 configs += [ ":apm_debug_dump" ]
ehmaldonado1fd08c12017-01-17 02:37:34 -0800493 sources = [
494 "test/aec_dump_based_simulator.cc",
495 "test/aec_dump_based_simulator.h",
Per Åhgrenada9b892019-04-03 16:06:42 +0200496 "test/api_call_statistics.cc",
497 "test/api_call_statistics.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800498 "test/audio_processing_simulator.cc",
499 "test/audio_processing_simulator.h",
Ivo Creusen2cb41052018-03-15 12:22:52 +0100500 "test/audioproc_float_impl.cc",
501 "test/audioproc_float_impl.h",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800502 "test/wav_based_simulator.cc",
503 "test/wav_based_simulator.h",
504 ]
peahc3ec1fd2016-08-07 23:19:30 -0700505
ehmaldonado1fd08c12017-01-17 02:37:34 -0800506 deps = [
Alessio Bazzicaca90a552017-09-27 11:51:10 +0200507 ":analog_mic_simulation",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000508 ":api",
Per Åhgren7a95e0f2018-10-25 09:56:49 +0200509 ":apm_logging",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800510 ":audio_processing",
511 ":audioproc_debug_proto",
512 ":audioproc_protobuf_utils",
513 ":audioproc_test_utils",
Alex Loiko62347222018-09-10 10:18:07 +0200514 ":runtime_settings_protobuf_utils",
Sam Zackrissona4c85142018-10-10 10:44:43 +0200515 "../../api/audio:aec3_config_json",
Gustaf Ullberg0efa9412018-02-27 13:58:45 +0100516 "../../api/audio:aec3_factory",
Artem Titov94b57c02019-03-21 13:35:10 +0100517 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100518 "../../rtc_base:checks",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200519 "../../rtc_base:ignore_wundef",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700520 "../../rtc_base:protobuf_utils",
521 "../../rtc_base:rtc_base_approved",
Per Åhgrenad09d742018-03-08 07:47:14 +0100522 "../../rtc_base:rtc_json",
Danil Chapovalov07122bc2019-03-26 14:37:01 +0100523 "../../rtc_base:task_queue_for_test",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800524 "../../system_wrappers",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800525 "../../test:test_support",
aleloif4dd1912017-06-15 01:55:38 -0700526 "aec_dump",
527 "aec_dump:aec_dump_impl",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800528 "//testing/gtest",
Mirko Bonadei2ab97f62019-07-18 13:44:12 +0200529 "//third_party/abseil-cpp/absl/flags:flag",
530 "//third_party/abseil-cpp/absl/flags:parse",
Alessio Bazzica68170382018-11-20 12:27:20 +0100531 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200532 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado1fd08c12017-01-17 02:37:34 -0800533 ]
Ivo Creusen8c812f32018-03-09 17:33:04 +0100534 } # audioproc_f_impl
ehmaldonado1fd08c12017-01-17 02:37:34 -0800535 }
peahc3ec1fd2016-08-07 23:19:30 -0700536
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200537 rtc_library("audioproc_test_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000538 visibility = [ "*" ]
kjellanderfb114242016-06-13 00:19:48 -0700539 testonly = true
540 sources = [
ehmaldonado529f83c2016-07-27 08:14:32 -0700541 "test/audio_buffer_tools.cc",
542 "test/audio_buffer_tools.h",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200543 "test/bitexactness_tools.cc",
544 "test/bitexactness_tools.h",
ivoc3cfb3ef2016-11-24 04:17:28 -0800545 "test/performance_timer.cc",
546 "test/performance_timer.h",
547 "test/simulator_buffers.cc",
548 "test/simulator_buffers.h",
kjellanderfb114242016-06-13 00:19:48 -0700549 "test/test_utils.cc",
550 "test/test_utils.h",
551 ]
552
kjellanderfb114242016-06-13 00:19:48 -0700553 deps = [
Alessio Bazzicab768e882018-11-07 14:29:54 +0000554 ":api",
Per Åhgren44ce4b42019-03-05 08:40:48 +0100555 ":audio_buffer",
ehmaldonado64c4a7e2016-12-08 04:10:01 -0800556 ":audio_processing",
kwiberg529662a2017-09-04 05:43:17 -0700557 "../../api:array_view",
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +0200558 "../../api/audio:audio_frame_api",
kjellanderfb114242016-06-13 00:19:48 -0700559 "../../common_audio",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100560 "../../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700561 "../../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200562 "../../rtc_base/system:arch",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100563 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100564 "../../test:fileutils",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200565 "../../test:test_support",
Ivo Creusen385b10b2017-10-13 12:37:27 +0200566 "../audio_coding:neteq_input_audio_tools",
Sam Zackrissond57f9dd2017-09-13 11:00:04 +0200567 "//testing/gtest",
Danil Chapovalovdb9f7ab2018-06-19 10:50:11 +0200568 "//third_party/abseil-cpp/absl/types:optional",
kjellanderfb114242016-06-13 00:19:48 -0700569 ]
570 }
571
ehmaldonado38a21322016-09-02 04:10:34 -0700572 rtc_executable("transient_suppression_test") {
kwiberg7a770e02016-08-25 02:32:43 -0700573 testonly = true
574 sources = [
575 "transient/file_utils.cc",
576 "transient/file_utils.h",
577 "transient/transient_suppression_test.cc",
578 ]
579 deps = [
580 ":audio_processing",
Artem Titov94b57c02019-03-21 13:35:10 +0100581 "../../common_audio",
oprypin6e09d872017-08-31 03:21:39 -0700582 "../../rtc_base:rtc_base_approved",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100583 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100584 "../../system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100585 "../../test:fileutils",
kwiberg7a770e02016-08-25 02:32:43 -0700586 "../../test:test_support",
Alex Loikoed8ff642018-07-06 14:54:30 +0200587 "agc:level_estimation",
kwiberg7a770e02016-08-25 02:32:43 -0700588 "//testing/gtest",
Mirko Bonadei2ab97f62019-07-18 13:44:12 +0200589 "//third_party/abseil-cpp/absl/flags:flag",
590 "//third_party/abseil-cpp/absl/flags:parse",
kwiberg7a770e02016-08-25 02:32:43 -0700591 ]
kwiberg7a770e02016-08-25 02:32:43 -0700592 }
593
ehmaldonado38a21322016-09-02 04:10:34 -0700594 rtc_executable("click_annotate") {
kwiberg7a770e02016-08-25 02:32:43 -0700595 testonly = true
596 sources = [
597 "transient/click_annotate.cc",
598 "transient/file_utils.cc",
599 "transient/file_utils.h",
600 ]
601 deps = [
602 ":audio_processing",
Karl Wiberg6a4d4112018-03-23 10:39:34 +0100603 "../../rtc_base/system:file_wrapper",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100604 "../../system_wrappers",
kwiberg7a770e02016-08-25 02:32:43 -0700605 ]
606 }
607
kjellanderfb114242016-06-13 00:19:48 -0700608 if (rtc_enable_protobuf) {
609 proto_library("audioproc_unittest_proto") {
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100610 sources = [ "test/unittest.proto" ]
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200611 proto_out_dir = "modules/audio_processing/test"
kjellanderfb114242016-06-13 00:19:48 -0700612 }
613
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200614 rtc_library("audioproc_protobuf_utils") {
kjellanderfb114242016-06-13 00:19:48 -0700615 sources = [
616 "test/protobuf_utils.cc",
617 "test/protobuf_utils.h",
618 ]
619
620 deps = [
ehmaldonadobcba64a2016-08-19 02:11:07 -0700621 ":audioproc_debug_proto",
Alex Loiko62347222018-09-10 10:18:07 +0200622 "../../rtc_base:checks",
Mirko Bonadei3663ed32019-10-19 12:03:23 +0200623 "../../rtc_base:ignore_wundef",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700624 "../../rtc_base:protobuf_utils",
625 "../../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200626 "../../rtc_base/system:arch",
kjellanderfb114242016-06-13 00:19:48 -0700627 ]
628 }
Alex Loiko62347222018-09-10 10:18:07 +0200629
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200630 rtc_library("runtime_settings_protobuf_utils") {
Alex Loiko62347222018-09-10 10:18:07 +0200631 testonly = true
632 sources = [
633 "test/runtime_setting_util.cc",
634 "test/runtime_setting_util.h",
635 ]
636
637 deps = [
Alessio Bazzicab768e882018-11-07 14:29:54 +0000638 ":api",
Alex Loiko62347222018-09-10 10:18:07 +0200639 ":audio_processing",
640 ":audioproc_debug_proto",
641 ":audioproc_protobuf_utils",
642 "../../rtc_base:checks",
643 ]
644 }
kjellanderfb114242016-06-13 00:19:48 -0700645 }
646}