blob: 4ee6c5c3c1e25f751563538ac3d505776a642349 [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',
38 'aec/aec_core_internal.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',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000044 'aec/echo_cancellation_internal.h',
Henrik Kjellander9b72af92015-11-11 20:16:11 +010045 'aec/echo_cancellation.h',
peah27045122016-04-10 22:38:14 -070046 'aecm/aecm_core.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000047 'aecm/aecm_core.h',
peah27045122016-04-10 22:38:14 -070048 'aecm/echo_control_mobile.cc',
Henrik Kjellander9b72af92015-11-11 20:16:11 +010049 'aecm/echo_control_mobile.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000050 'agc/agc.cc',
51 'agc/agc.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000052 'agc/agc_manager_direct.cc',
53 'agc/agc_manager_direct.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000054 'agc/gain_map_internal.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000055 'agc/histogram.cc',
56 'agc/histogram.h',
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000057 'agc/legacy/analog_agc.c',
58 'agc/legacy/analog_agc.h',
59 'agc/legacy/digital_agc.c',
60 'agc/legacy/digital_agc.h',
61 'agc/legacy/gain_control.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000062 'agc/utility.cc',
63 'agc/utility.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000064 'audio_buffer.cc',
65 'audio_buffer.h',
66 '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',
Michael Graczykdfa36052015-03-25 16:37:27 -070070 'beamformer/beamformer.h',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000071 'beamformer/complex_matrix.h',
72 'beamformer/covariance_matrix_generator.cc',
73 'beamformer/covariance_matrix_generator.h',
74 'beamformer/matrix.h',
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000075 'beamformer/nonlinear_beamformer.cc',
76 'beamformer/nonlinear_beamformer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000077 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000078 'echo_cancellation_impl.cc',
79 'echo_cancellation_impl.h',
80 'echo_control_mobile_impl.cc',
81 'echo_control_mobile_impl.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',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000088 'include/audio_processing.h',
ekmdb4fecf2015-06-22 17:49:08 -070089 'intelligibility/intelligibility_enhancer.cc',
90 'intelligibility/intelligibility_enhancer.h',
91 'intelligibility/intelligibility_utils.cc',
92 'intelligibility/intelligibility_utils.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000093 'level_estimator_impl.cc',
94 'level_estimator_impl.h',
peahb46083e2016-05-03 07:01:18 -070095 'logging/apm_data_dumper.cc',
96 'logging/apm_data_dumper.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000097 'noise_suppression_impl.cc',
98 'noise_suppression_impl.h',
peah737f4b82016-03-10 23:05:28 -080099 'render_queue_item_verifier.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000100 'rms_level.cc',
101 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000102 'splitting_filter.cc',
103 'splitting_filter.h',
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700104 'three_band_filter_bank.cc',
105 'three_band_filter_bank.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000106 'transient/common.h',
107 'transient/daubechies_8_wavelet_coeffs.h',
108 'transient/dyadic_decimator.h',
109 'transient/moving_moments.cc',
110 'transient/moving_moments.h',
111 'transient/transient_detector.cc',
112 'transient/transient_detector.h',
113 'transient/transient_suppressor.cc',
114 'transient/transient_suppressor.h',
115 'transient/wpd_node.cc',
116 'transient/wpd_node.h',
117 'transient/wpd_tree.cc',
118 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000119 'typing_detection.cc',
120 'typing_detection.h',
minyue84db6fa2016-03-24 14:36:25 -0700121 'utility/block_mean_calculator.cc',
122 'utility/block_mean_calculator.h',
peahbdb7af62016-04-12 14:47:40 -0700123 'utility/delay_estimator.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000124 'utility/delay_estimator.h',
125 'utility/delay_estimator_internal.h',
peahbdb7af62016-04-12 14:47:40 -0700126 'utility/delay_estimator_wrapper.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000127 'utility/delay_estimator_wrapper.h',
aluebsecf6b812015-06-25 12:28:48 -0700128 'vad/common.h',
129 'vad/gmm.cc',
130 'vad/gmm.h',
131 'vad/noise_gmm_tables.h',
132 'vad/pitch_based_vad.cc',
133 'vad/pitch_based_vad.h',
134 'vad/pitch_internal.cc',
135 'vad/pitch_internal.h',
136 'vad/pole_zero_filter.cc',
137 'vad/pole_zero_filter.h',
138 'vad/standalone_vad.cc',
139 'vad/standalone_vad.h',
140 'vad/vad_audio_proc.cc',
141 'vad/vad_audio_proc.h',
142 'vad/vad_audio_proc_internal.h',
143 'vad/vad_circular_buffer.cc',
144 'vad/vad_circular_buffer.h',
145 'vad/voice_activity_detector.cc',
146 'vad/voice_activity_detector.h',
147 'vad/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000148 'voice_detection_impl.cc',
149 'voice_detection_impl.h',
150 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000151 'conditions': [
152 ['aec_debug_dump==1', {
peahb46083e2016-05-03 07:01:18 -0700153 'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
154 }, {
155 'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000156 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000157 ['aec_untrusted_delay_for_testing==1', {
158 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
159 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000160 ['agc_debug_dump==1', {
161 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
162 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000163 ['enable_protobuf==1', {
164 'dependencies': ['audioproc_debug_proto'],
165 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
166 }],
167 ['prefer_fixed_point==1', {
168 'defines': ['WEBRTC_NS_FIXED'],
169 'sources': [
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100170 'ns/noise_suppression_x.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000171 'ns/noise_suppression_x.c',
172 'ns/nsx_core.c',
173 'ns/nsx_core.h',
174 'ns/nsx_defines.h',
175 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000176 'conditions': [
Richard Colesd417c932015-04-09 17:36:12 +0200177 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000178 'sources': [
179 'ns/nsx_core_mips.c',
180 ],
181 }, {
182 'sources': [
183 'ns/nsx_core_c.c',
184 ],
185 }],
186 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000187 }, {
188 'defines': ['WEBRTC_NS_FLOAT'],
189 'sources': [
190 'ns/defines.h',
Henrik Kjellander9b72af92015-11-11 20:16:11 +0100191 'ns/noise_suppression.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000192 'ns/noise_suppression.c',
193 'ns/ns_core.c',
194 'ns/ns_core.h',
195 'ns/windows_private.h',
196 ],
197 }],
198 ['target_arch=="ia32" or target_arch=="x64"', {
199 'dependencies': ['audio_processing_sse2',],
200 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700201 ['build_with_neon==1', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000202 'dependencies': ['audio_processing_neon',],
203 }],
Richard Colesd417c932015-04-09 17:36:12 +0200204 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000205 'sources': [
peah27045122016-04-10 22:38:14 -0700206 'aecm/aecm_core_mips.cc',
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000207 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000208 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000209 ['mips_float_abi=="hard"', {
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000210 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800211 'aec/aec_core_mips.cc',
peah21a395d2016-04-13 07:53:48 -0700212 'aec/aec_rdft_mips.cc',
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000213 ],
214 }],
215 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000216 }, {
217 'sources': [
peah27045122016-04-10 22:38:14 -0700218 'aecm/aecm_core_c.cc',
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000219 ],
220 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000221 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000222 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
223 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000224 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000225 ],
226 'conditions': [
227 ['enable_protobuf==1', {
228 'targets': [
229 {
230 'target_name': 'audioproc_debug_proto',
231 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000232 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000233 'variables': {
234 'proto_in_dir': '.',
235 # Workaround to protect against gyp's pathname relativization when
236 # this file is included by modules.gyp.
kjellander78ddd732016-02-09 08:13:06 -0800237 'proto_out_protected': 'webrtc/modules/audio_processing',
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000238 'proto_out_dir': '<(proto_out_protected)',
239 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000240 'includes': ['../../build/protoc.gypi',],
241 },
242 ],
243 }],
244 ['target_arch=="ia32" or target_arch=="x64"', {
245 'targets': [
246 {
247 'target_name': 'audio_processing_sse2',
248 'type': 'static_library',
249 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800250 'aec/aec_core_sse2.cc',
peah21a395d2016-04-13 07:53:48 -0700251 'aec/aec_rdft_sse2.cc',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000252 ],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200253 'conditions': [
peahb46083e2016-05-03 07:01:18 -0700254 ['aec_debug_dump==1', {
255 'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
256 }, {
257 'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
258 }],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200259 ['os_posix==1', {
260 'cflags': [ '-msse2', ],
261 'xcode_settings': {
262 'OTHER_CFLAGS': [ '-msse2', ],
263 },
264 }],
265 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000266 },
267 ],
268 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700269 ['build_with_neon==1', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000270 'targets': [{
271 'target_name': 'audio_processing_neon',
272 'type': 'static_library',
273 'includes': ['../../build/arm_neon.gypi',],
274 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000275 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000276 ],
277 'sources': [
peah8df5d4f2016-02-23 14:34:59 -0800278 'aec/aec_core_neon.cc',
peah21a395d2016-04-13 07:53:48 -0700279 'aec/aec_rdft_neon.cc',
peah27045122016-04-10 22:38:14 -0700280 'aecm/aecm_core_neon.cc',
kma@webrtc.org12454022012-11-07 22:34:31 +0000281 'ns/nsx_core_neon.c',
282 ],
peahb46083e2016-05-03 07:01:18 -0700283 'conditions': [
284 ['aec_debug_dump==1', {
285 'defines': ['WEBRTC_AEC_DEBUG_DUMP=1',],
286 }],
287 ['aec_debug_dump==0', {
288 'defines': ['WEBRTC_AEC_DEBUG_DUMP=0',],
289 }],
290 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000291 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000292 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000293 ],
294}