blob: 15dad4f9797d289f4a7e5c0539e86d826bc76df5 [file] [log] [blame]
andrew@webrtc.orgb9d7d932012-01-25 19:21:13 +00001# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00002#
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
9{
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000010 'variables': {
michaelbai@google.com82ebb462014-02-11 04:48:27 +000011 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000012 },
niklase@google.com470e71d2011-07-07 08:21:25 +000013 'targets': [
14 {
15 'target_name': 'audio_processing',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000016 'type': 'static_library',
17 'variables': {
18 # Outputs some low-level debug files.
bjornv@webrtc.orgea297872014-09-23 11:21:39 +000019 'agc_debug_dump%': 0,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000020
21 # Disables the usual mode where we trust the reported system delay
22 # values the AEC receives. The corresponding define is set appropriately
23 # in the code, but it can be force-enabled here for testing.
24 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000025 },
niklase@google.com470e71d2011-07-07 08:21:25 +000026 'dependencies': [
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000027 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000028 '<(webrtc_root)/common.gyp:webrtc_common',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000029 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
Zeke Chin786dbdc2015-06-10 13:45:08 -070030 '<(webrtc_root)/modules/modules.gyp:isac',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000031 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
niklase@google.com470e71d2011-07-07 08:21:25 +000032 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000033 'sources': [
peah8df5d4f2016-02-23 14:34:59 -080034 'aec/aec_core.cc',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000035 'aec/aec_core.h',
peahe687f782016-05-09 03:57:33 -070036 'aec/aec_core_optimized_methods.h',
peah88950cf2016-03-04 00:12:40 -080037 'aec/aec_resampler.cc',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000038 'aec/aec_resampler.h',
peah8df5d4f2016-02-23 14:34:59 -080039 'aec/echo_cancellation.cc',
Henrik Kjellander9b72af92015-11-11 20:16:11 +010040 'aec/echo_cancellation.h',
peah27045122016-04-10 22:38:14 -070041 'aecm/aecm_core.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000042 'aecm/aecm_core.h',
peah27045122016-04-10 22:38:14 -070043 'aecm/echo_control_mobile.cc',
Henrik Kjellander9b72af92015-11-11 20:16:11 +010044 'aecm/echo_control_mobile.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000045 'agc/agc.cc',
46 'agc/agc.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000047 'agc/agc_manager_direct.cc',
48 'agc/agc_manager_direct.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000049 'agc/gain_map_internal.h',
peahbbe42332016-06-08 06:42:02 -070050 'agc/loudness_histogram.cc',
51 'agc/loudness_histogram.h',
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000052 'agc/legacy/analog_agc.c',
53 'agc/legacy/analog_agc.h',
54 'agc/legacy/digital_agc.c',
55 'agc/legacy/digital_agc.h',
56 'agc/legacy/gain_control.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000057 'agc/utility.cc',
58 'agc/utility.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000059 'audio_buffer.cc',
60 'audio_buffer.h',
61 'audio_processing_impl.cc',
62 'audio_processing_impl.h',
aluebs4a66e4a2015-10-19 18:02:39 -070063 'beamformer/array_util.cc',
64 'beamformer/array_util.h',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000065 'beamformer/complex_matrix.h',
66 'beamformer/covariance_matrix_generator.cc',
67 'beamformer/covariance_matrix_generator.h',
68 'beamformer/matrix.h',
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000069 'beamformer/nonlinear_beamformer.cc',
70 'beamformer/nonlinear_beamformer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000071 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000072 'echo_cancellation_impl.cc',
73 'echo_cancellation_impl.h',
74 'echo_control_mobile_impl.cc',
75 'echo_control_mobile_impl.h',
ivocaf27ed02016-10-28 07:04:03 -070076 'echo_detector/circular_buffer.cc',
77 'echo_detector/circular_buffer.h',
78 'echo_detector/mean_variance_estimator.cc',
79 'echo_detector/mean_variance_estimator.h',
80 'echo_detector/normalized_covariance_estimator.cc',
81 'echo_detector/normalized_covariance_estimator.h',
peahbe615622016-02-13 16:40:47 -080082 'gain_control_for_experimental_agc.cc',
83 'gain_control_for_experimental_agc.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000084 'gain_control_impl.cc',
85 'gain_control_impl.h',
86 'high_pass_filter_impl.cc',
87 'high_pass_filter_impl.h',
peahc19f3122016-10-07 14:54:10 -070088 'include/audio_processing.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000089 'include/audio_processing.h',
solenberg88499ec2016-09-07 07:34:41 -070090 'include/config.cc',
91 'include/config.h',
peahca4cac72016-06-29 15:26:12 -070092 'level_controller/biquad_filter.cc',
93 'level_controller/biquad_filter.h',
94 'level_controller/down_sampler.cc',
95 'level_controller/down_sampler.h',
96 'level_controller/gain_applier.cc',
97 'level_controller/gain_applier.h',
98 'level_controller/gain_selector.cc',
99 'level_controller/gain_selector.h',
peahc19f3122016-10-07 14:54:10 -0700100 'level_controller/level_controller_constants.h',
peahca4cac72016-06-29 15:26:12 -0700101 'level_controller/level_controller.cc',
102 'level_controller/level_controller.h',
103 'level_controller/noise_spectrum_estimator.cc',
104 'level_controller/noise_spectrum_estimator.h',
105 'level_controller/noise_level_estimator.cc',
106 'level_controller/noise_level_estimator.h',
107 'level_controller/peak_level_estimator.cc',
108 'level_controller/peak_level_estimator.h',
109 'level_controller/saturating_gain_estimator.cc',
110 'level_controller/saturating_gain_estimator.h',
111 'level_controller/signal_classifier.cc',
112 'level_controller/signal_classifier.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000113 'level_estimator_impl.cc',
114 'level_estimator_impl.h',
peahb46083e2016-05-03 07:01:18 -0700115 'logging/apm_data_dumper.cc',
116 'logging/apm_data_dumper.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000117 'noise_suppression_impl.cc',
118 'noise_suppression_impl.h',
peah737f4b82016-03-10 23:05:28 -0800119 'render_queue_item_verifier.h',
ivoc9f4a4a02016-10-28 05:39:16 -0700120 'residual_echo_detector.cc',
121 'residual_echo_detector.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000122 'rms_level.cc',
123 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000124 'splitting_filter.cc',
125 'splitting_filter.h',
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700126 'three_band_filter_bank.cc',
127 'three_band_filter_bank.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000128 'transient/common.h',
129 'transient/daubechies_8_wavelet_coeffs.h',
130 'transient/dyadic_decimator.h',
131 'transient/moving_moments.cc',
132 'transient/moving_moments.h',
133 'transient/transient_detector.cc',
134 'transient/transient_detector.h',
135 'transient/transient_suppressor.cc',
136 'transient/transient_suppressor.h',
137 'transient/wpd_node.cc',
138 'transient/wpd_node.h',
139 'transient/wpd_tree.cc',
140 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000141 'typing_detection.cc',
142 'typing_detection.h',
minyue84db6fa2016-03-24 14:36:25 -0700143 'utility/block_mean_calculator.cc',
144 'utility/block_mean_calculator.h',
peahbdb7af62016-04-12 14:47:40 -0700145 'utility/delay_estimator.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000146 'utility/delay_estimator.h',
147 'utility/delay_estimator_internal.h',
peahbdb7af62016-04-12 14:47:40 -0700148 'utility/delay_estimator_wrapper.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000149 'utility/delay_estimator_wrapper.h',
peah81b92912016-10-06 06:46:20 -0700150 'utility/ooura_fft.cc',
151 'utility/ooura_fft.h',
152 'utility/ooura_fft_tables_common.h',
aluebsecf6b812015-06-25 12:28:48 -0700153 'vad/common.h',
154 'vad/gmm.cc',
155 'vad/gmm.h',
156 'vad/noise_gmm_tables.h',
157 'vad/pitch_based_vad.cc',
158 'vad/pitch_based_vad.h',
159 'vad/pitch_internal.cc',
160 'vad/pitch_internal.h',
161 'vad/pole_zero_filter.cc',
162 'vad/pole_zero_filter.h',
163 'vad/standalone_vad.cc',
164 'vad/standalone_vad.h',
165 'vad/vad_audio_proc.cc',
166 'vad/vad_audio_proc.h',
167 'vad/vad_audio_proc_internal.h',
168 'vad/vad_circular_buffer.cc',
169 'vad/vad_circular_buffer.h',
170 'vad/voice_activity_detector.cc',
171 'vad/voice_activity_detector.h',
172 'vad/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000173 'voice_detection_impl.cc',
174 'voice_detection_impl.h',
175 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000176 'conditions': [
peahf28a3892016-09-01 08:58:21 -0700177 ['apm_debug_dump==1', {
178 'defines': ['WEBRTC_APM_DEBUG_DUMP=1',],
peahb46083e2016-05-03 07:01:18 -0700179 }, {
peahf28a3892016-09-01 08:58:21 -0700180 'defines': ['WEBRTC_APM_DEBUG_DUMP=0',],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000181 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000182 ['aec_untrusted_delay_for_testing==1', {
183 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
184 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000185 ['agc_debug_dump==1', {
186 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
187 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000188 ['enable_protobuf==1', {
189 'dependencies': ['audioproc_debug_proto'],
190 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
191 }],
peah1bcfce52016-08-26 07:16:04 -0700192 ['enable_intelligibility_enhancer==1', {
193 'defines': ['WEBRTC_INTELLIGIBILITY_ENHANCER=1',],
194 'sources': [
195 'intelligibility/intelligibility_enhancer.cc',
196 'intelligibility/intelligibility_enhancer.h',
197 'intelligibility/intelligibility_utils.cc',
198 'intelligibility/intelligibility_utils.h',
199 ],
200 }, {
201 'defines': ['WEBRTC_INTELLIGIBILITY_ENHANCER=0',],
202 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000203 ['prefer_fixed_point==1', {
204 'defines': ['WEBRTC_NS_FIXED'],
205 'sources': [
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100206 'ns/noise_suppression_x.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000207 'ns/noise_suppression_x.c',
208 'ns/nsx_core.c',
209 'ns/nsx_core.h',
210 'ns/nsx_defines.h',
211 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000212 'conditions': [
Richard Colesd417c932015-04-09 17:36:12 +0200213 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000214 'sources': [
215 'ns/nsx_core_mips.c',
216 ],
217 }, {
218 'sources': [
219 'ns/nsx_core_c.c',
220 ],
221 }],
222 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000223 }, {
224 'defines': ['WEBRTC_NS_FLOAT'],
225 'sources': [
226 'ns/defines.h',
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100227 'ns/noise_suppression.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000228 'ns/noise_suppression.c',
229 'ns/ns_core.c',
230 'ns/ns_core.h',
231 'ns/windows_private.h',
232 ],
233 }],
234 ['target_arch=="ia32" or target_arch=="x64"', {
235 'dependencies': ['audio_processing_sse2',],
236 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700237 ['build_with_neon==1', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000238 'dependencies': ['audio_processing_neon',],
239 }],
Richard Colesd417c932015-04-09 17:36:12 +0200240 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000241 'sources': [
peah27045122016-04-10 22:38:14 -0700242 'aecm/aecm_core_mips.cc',
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000243 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000244 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000245 ['mips_float_abi=="hard"', {
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000246 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800247 'aec/aec_core_mips.cc',
peah81b92912016-10-06 06:46:20 -0700248 'utility/ooura_fft_mips.cc',
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000249 ],
250 }],
251 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000252 }, {
253 'sources': [
peah27045122016-04-10 22:38:14 -0700254 'aecm/aecm_core_c.cc',
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000255 ],
256 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000257 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000258 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
259 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000260 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000261 ],
262 'conditions': [
263 ['enable_protobuf==1', {
264 'targets': [
265 {
266 'target_name': 'audioproc_debug_proto',
267 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000268 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000269 'variables': {
270 'proto_in_dir': '.',
271 # Workaround to protect against gyp's pathname relativization when
272 # this file is included by modules.gyp.
kjellander78ddd732016-02-09 08:13:06 -0800273 'proto_out_protected': 'webrtc/modules/audio_processing',
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000274 'proto_out_dir': '<(proto_out_protected)',
275 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000276 'includes': ['../../build/protoc.gypi',],
277 },
278 ],
279 }],
280 ['target_arch=="ia32" or target_arch=="x64"', {
281 'targets': [
282 {
283 'target_name': 'audio_processing_sse2',
284 'type': 'static_library',
285 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800286 'aec/aec_core_sse2.cc',
peah81b92912016-10-06 06:46:20 -0700287 'utility/ooura_fft_sse2.cc',
288 'utility/ooura_fft_tables_neon_sse2.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000289 ],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200290 'conditions': [
peahf28a3892016-09-01 08:58:21 -0700291 ['apm_debug_dump==1', {
292 'defines': ['WEBRTC_APM_DEBUG_DUMP=1',],
peahb46083e2016-05-03 07:01:18 -0700293 }, {
peahf28a3892016-09-01 08:58:21 -0700294 'defines': ['WEBRTC_APM_DEBUG_DUMP=0',],
peahb46083e2016-05-03 07:01:18 -0700295 }],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200296 ['os_posix==1', {
297 'cflags': [ '-msse2', ],
298 'xcode_settings': {
299 'OTHER_CFLAGS': [ '-msse2', ],
300 },
301 }],
302 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000303 },
304 ],
305 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700306 ['build_with_neon==1', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000307 'targets': [{
308 'target_name': 'audio_processing_neon',
309 'type': 'static_library',
310 'includes': ['../../build/arm_neon.gypi',],
311 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000312 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000313 ],
314 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800315 'aec/aec_core_neon.cc',
peah27045122016-04-10 22:38:14 -0700316 'aecm/aecm_core_neon.cc',
kma@webrtc.org12454022012-11-07 22:34:31 +0000317 'ns/nsx_core_neon.c',
peah81b92912016-10-06 06:46:20 -0700318 'utility/ooura_fft_neon.cc',
319 'utility/ooura_fft_tables_neon_sse2.h',
kma@webrtc.org12454022012-11-07 22:34:31 +0000320 ],
peahb46083e2016-05-03 07:01:18 -0700321 'conditions': [
peahf28a3892016-09-01 08:58:21 -0700322 ['apm_debug_dump==1', {
323 'defines': ['WEBRTC_APM_DEBUG_DUMP=1',],
peahb46083e2016-05-03 07:01:18 -0700324 }],
peahf28a3892016-09-01 08:58:21 -0700325 ['apm_debug_dump==0', {
326 'defines': ['WEBRTC_APM_DEBUG_DUMP=0',],
peahb46083e2016-05-03 07:01:18 -0700327 }],
328 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000329 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000330 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000331 ],
332}