blob: 14e1b66862b75ad655d5effb4453e054aa20e4ac [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',
peahb46083e2016-05-03 07:01:18 -070012 # Outputs some low-level debug files.
13 'aec_debug_dump%': 0,
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000014 },
niklase@google.com470e71d2011-07-07 08:21:25 +000015 'targets': [
16 {
17 'target_name': 'audio_processing',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000018 'type': 'static_library',
19 'variables': {
20 # Outputs some low-level debug files.
bjornv@webrtc.orgea297872014-09-23 11:21:39 +000021 'agc_debug_dump%': 0,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000022
23 # Disables the usual mode where we trust the reported system delay
24 # values the AEC receives. The corresponding define is set appropriately
25 # in the code, but it can be force-enabled here for testing.
26 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000027 },
niklase@google.com470e71d2011-07-07 08:21:25 +000028 'dependencies': [
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000029 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000030 '<(webrtc_root)/common.gyp:webrtc_common',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000031 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
Zeke Chin786dbdc2015-06-10 13:45:08 -070032 '<(webrtc_root)/modules/modules.gyp:isac',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000033 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
niklase@google.com470e71d2011-07-07 08:21:25 +000034 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000035 'sources': [
peah8df5d4f2016-02-23 14:34:59 -080036 'aec/aec_core.cc',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000037 'aec/aec_core.h',
peahe687f782016-05-09 03:57:33 -070038 'aec/aec_core_optimized_methods.h',
peah21a395d2016-04-13 07:53:48 -070039 'aec/aec_rdft.cc',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000040 'aec/aec_rdft.h',
peah88950cf2016-03-04 00:12:40 -080041 'aec/aec_resampler.cc',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000042 'aec/aec_resampler.h',
peah8df5d4f2016-02-23 14:34:59 -080043 'aec/echo_cancellation.cc',
Henrik Kjellander9b72af92015-11-11 20:16:11 +010044 'aec/echo_cancellation.h',
peah27045122016-04-10 22:38:14 -070045 'aecm/aecm_core.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000046 'aecm/aecm_core.h',
peah27045122016-04-10 22:38:14 -070047 'aecm/echo_control_mobile.cc',
Henrik Kjellander9b72af92015-11-11 20:16:11 +010048 'aecm/echo_control_mobile.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000049 'agc/agc.cc',
50 'agc/agc.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000051 'agc/agc_manager_direct.cc',
52 'agc/agc_manager_direct.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000053 'agc/gain_map_internal.h',
peahbbe42332016-06-08 06:42:02 -070054 'agc/loudness_histogram.cc',
55 'agc/loudness_histogram.h',
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000056 'agc/legacy/analog_agc.c',
57 'agc/legacy/analog_agc.h',
58 'agc/legacy/digital_agc.c',
59 'agc/legacy/digital_agc.h',
60 'agc/legacy/gain_control.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000061 'agc/utility.cc',
62 'agc/utility.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000063 'audio_buffer.cc',
64 'audio_buffer.h',
aleloi5f099802016-08-25 00:45:31 -070065 'audio_processing.cc',
niklase@google.com470e71d2011-07-07 08:21:25 +000066 'audio_processing_impl.cc',
67 'audio_processing_impl.h',
aluebs4a66e4a2015-10-19 18:02:39 -070068 'beamformer/array_util.cc',
69 'beamformer/array_util.h',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000070 'beamformer/complex_matrix.h',
71 'beamformer/covariance_matrix_generator.cc',
72 'beamformer/covariance_matrix_generator.h',
73 'beamformer/matrix.h',
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000074 'beamformer/nonlinear_beamformer.cc',
75 'beamformer/nonlinear_beamformer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000076 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000077 'echo_cancellation_impl.cc',
78 'echo_cancellation_impl.h',
79 'echo_control_mobile_impl.cc',
80 'echo_control_mobile_impl.h',
peahbe615622016-02-13 16:40:47 -080081 'gain_control_for_experimental_agc.cc',
82 'gain_control_for_experimental_agc.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000083 'gain_control_impl.cc',
84 'gain_control_impl.h',
85 'high_pass_filter_impl.cc',
86 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000087 'include/audio_processing.h',
peahca4cac72016-06-29 15:26:12 -070088 'level_controller/biquad_filter.cc',
89 'level_controller/biquad_filter.h',
90 'level_controller/down_sampler.cc',
91 'level_controller/down_sampler.h',
92 'level_controller/gain_applier.cc',
93 'level_controller/gain_applier.h',
94 'level_controller/gain_selector.cc',
95 'level_controller/gain_selector.h',
96 'level_controller/lc_constants.h',
97 'level_controller/level_controller.cc',
98 'level_controller/level_controller.h',
99 'level_controller/noise_spectrum_estimator.cc',
100 'level_controller/noise_spectrum_estimator.h',
101 'level_controller/noise_level_estimator.cc',
102 'level_controller/noise_level_estimator.h',
103 'level_controller/peak_level_estimator.cc',
104 'level_controller/peak_level_estimator.h',
105 'level_controller/saturating_gain_estimator.cc',
106 'level_controller/saturating_gain_estimator.h',
107 'level_controller/signal_classifier.cc',
108 'level_controller/signal_classifier.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000109 'level_estimator_impl.cc',
110 'level_estimator_impl.h',
peahb46083e2016-05-03 07:01:18 -0700111 'logging/apm_data_dumper.cc',
112 'logging/apm_data_dumper.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000113 'noise_suppression_impl.cc',
114 'noise_suppression_impl.h',
peah737f4b82016-03-10 23:05:28 -0800115 'render_queue_item_verifier.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000116 'rms_level.cc',
117 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000118 'splitting_filter.cc',
119 'splitting_filter.h',
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700120 'three_band_filter_bank.cc',
121 'three_band_filter_bank.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000122 'transient/common.h',
123 'transient/daubechies_8_wavelet_coeffs.h',
124 'transient/dyadic_decimator.h',
125 'transient/moving_moments.cc',
126 'transient/moving_moments.h',
127 'transient/transient_detector.cc',
128 'transient/transient_detector.h',
129 'transient/transient_suppressor.cc',
130 'transient/transient_suppressor.h',
131 'transient/wpd_node.cc',
132 'transient/wpd_node.h',
133 'transient/wpd_tree.cc',
134 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000135 'typing_detection.cc',
136 'typing_detection.h',
minyue84db6fa2016-03-24 14:36:25 -0700137 'utility/block_mean_calculator.cc',
138 'utility/block_mean_calculator.h',
peahbdb7af62016-04-12 14:47:40 -0700139 'utility/delay_estimator.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000140 'utility/delay_estimator.h',
141 'utility/delay_estimator_internal.h',
peahbdb7af62016-04-12 14:47:40 -0700142 'utility/delay_estimator_wrapper.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000143 'utility/delay_estimator_wrapper.h',
aluebsecf6b812015-06-25 12:28:48 -0700144 'vad/common.h',
145 'vad/gmm.cc',
146 'vad/gmm.h',
147 'vad/noise_gmm_tables.h',
148 'vad/pitch_based_vad.cc',
149 'vad/pitch_based_vad.h',
150 'vad/pitch_internal.cc',
151 'vad/pitch_internal.h',
152 'vad/pole_zero_filter.cc',
153 'vad/pole_zero_filter.h',
154 'vad/standalone_vad.cc',
155 'vad/standalone_vad.h',
156 'vad/vad_audio_proc.cc',
157 'vad/vad_audio_proc.h',
158 'vad/vad_audio_proc_internal.h',
159 'vad/vad_circular_buffer.cc',
160 'vad/vad_circular_buffer.h',
161 'vad/voice_activity_detector.cc',
162 'vad/voice_activity_detector.h',
163 'vad/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000164 'voice_detection_impl.cc',
165 'voice_detection_impl.h',
166 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000167 'conditions': [
168 ['aec_debug_dump==1', {
peahb46083e2016-05-03 07:01:18 -0700169 'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
170 }, {
171 'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000172 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000173 ['aec_untrusted_delay_for_testing==1', {
174 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
175 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000176 ['agc_debug_dump==1', {
177 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
178 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000179 ['enable_protobuf==1', {
180 'dependencies': ['audioproc_debug_proto'],
181 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
182 }],
peah1bcfce52016-08-26 07:16:04 -0700183 ['enable_intelligibility_enhancer==1', {
184 'defines': ['WEBRTC_INTELLIGIBILITY_ENHANCER=1',],
185 'sources': [
186 'intelligibility/intelligibility_enhancer.cc',
187 'intelligibility/intelligibility_enhancer.h',
188 'intelligibility/intelligibility_utils.cc',
189 'intelligibility/intelligibility_utils.h',
190 ],
191 }, {
192 'defines': ['WEBRTC_INTELLIGIBILITY_ENHANCER=0',],
193 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000194 ['prefer_fixed_point==1', {
195 'defines': ['WEBRTC_NS_FIXED'],
196 'sources': [
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100197 'ns/noise_suppression_x.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000198 'ns/noise_suppression_x.c',
199 'ns/nsx_core.c',
200 'ns/nsx_core.h',
201 'ns/nsx_defines.h',
202 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000203 'conditions': [
Richard Colesd417c932015-04-09 17:36:12 +0200204 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000205 'sources': [
206 'ns/nsx_core_mips.c',
207 ],
208 }, {
209 'sources': [
210 'ns/nsx_core_c.c',
211 ],
212 }],
213 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000214 }, {
215 'defines': ['WEBRTC_NS_FLOAT'],
216 'sources': [
217 'ns/defines.h',
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100218 'ns/noise_suppression.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000219 'ns/noise_suppression.c',
220 'ns/ns_core.c',
221 'ns/ns_core.h',
222 'ns/windows_private.h',
223 ],
224 }],
225 ['target_arch=="ia32" or target_arch=="x64"', {
226 'dependencies': ['audio_processing_sse2',],
227 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700228 ['build_with_neon==1', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000229 'dependencies': ['audio_processing_neon',],
230 }],
Richard Colesd417c932015-04-09 17:36:12 +0200231 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000232 'sources': [
peah27045122016-04-10 22:38:14 -0700233 'aecm/aecm_core_mips.cc',
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000234 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000235 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000236 ['mips_float_abi=="hard"', {
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000237 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800238 'aec/aec_core_mips.cc',
peah21a395d2016-04-13 07:53:48 -0700239 'aec/aec_rdft_mips.cc',
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000240 ],
241 }],
242 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000243 }, {
244 'sources': [
peah27045122016-04-10 22:38:14 -0700245 'aecm/aecm_core_c.cc',
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000246 ],
247 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000248 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000249 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
250 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000251 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000252 ],
253 'conditions': [
254 ['enable_protobuf==1', {
255 'targets': [
256 {
257 'target_name': 'audioproc_debug_proto',
258 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000259 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000260 'variables': {
261 'proto_in_dir': '.',
262 # Workaround to protect against gyp's pathname relativization when
263 # this file is included by modules.gyp.
kjellander78ddd732016-02-09 08:13:06 -0800264 'proto_out_protected': 'webrtc/modules/audio_processing',
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000265 'proto_out_dir': '<(proto_out_protected)',
266 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000267 'includes': ['../../build/protoc.gypi',],
268 },
269 ],
270 }],
271 ['target_arch=="ia32" or target_arch=="x64"', {
272 'targets': [
273 {
274 'target_name': 'audio_processing_sse2',
275 'type': 'static_library',
276 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800277 'aec/aec_core_sse2.cc',
peah21a395d2016-04-13 07:53:48 -0700278 'aec/aec_rdft_sse2.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000279 ],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200280 'conditions': [
peahb46083e2016-05-03 07:01:18 -0700281 ['aec_debug_dump==1', {
282 'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
283 }, {
284 'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
285 }],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200286 ['os_posix==1', {
287 'cflags': [ '-msse2', ],
288 'xcode_settings': {
289 'OTHER_CFLAGS': [ '-msse2', ],
290 },
291 }],
292 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000293 },
294 ],
295 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700296 ['build_with_neon==1', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000297 'targets': [{
298 'target_name': 'audio_processing_neon',
299 'type': 'static_library',
300 'includes': ['../../build/arm_neon.gypi',],
301 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000302 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000303 ],
304 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800305 'aec/aec_core_neon.cc',
peah21a395d2016-04-13 07:53:48 -0700306 'aec/aec_rdft_neon.cc',
peah27045122016-04-10 22:38:14 -0700307 'aecm/aecm_core_neon.cc',
kma@webrtc.org12454022012-11-07 22:34:31 +0000308 'ns/nsx_core_neon.c',
309 ],
peahb46083e2016-05-03 07:01:18 -0700310 'conditions': [
311 ['aec_debug_dump==1', {
312 'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
313 }],
314 ['aec_debug_dump==0', {
315 'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
316 }],
317 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000318 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000319 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000320 ],
321}