blob: a6e8f5cc40dad2300f47941b81073181bc93a9ff [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.
19 'aec_debug_dump%': 0,
bjornv@webrtc.orgea297872014-09-23 11:21:39 +000020 'agc_debug_dump%': 0,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000021
22 # Disables the usual mode where we trust the reported system delay
23 # values the AEC receives. The corresponding define is set appropriately
24 # in the code, but it can be force-enabled here for testing.
25 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000026 },
niklase@google.com470e71d2011-07-07 08:21:25 +000027 'dependencies': [
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000028 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000029 '<(webrtc_root)/common.gyp:webrtc_common',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000030 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
Zeke Chin786dbdc2015-06-10 13:45:08 -070031 '<(webrtc_root)/modules/modules.gyp:isac',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000032 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
niklase@google.com470e71d2011-07-07 08:21:25 +000033 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000034 'sources': [
pbos@webrtc.org788acd12014-12-15 09:41:24 +000035 'aec/aec_core.c',
36 'aec/aec_core.h',
37 'aec/aec_core_internal.h',
38 'aec/aec_rdft.c',
39 'aec/aec_rdft.h',
40 'aec/aec_resampler.c',
41 'aec/aec_resampler.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000042 'aec/echo_cancellation.c',
43 'aec/echo_cancellation_internal.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000044 'aec/include/echo_cancellation.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000045 'aecm/aecm_core.c',
46 'aecm/aecm_core.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000047 'aecm/echo_control_mobile.c',
48 'aecm/include/echo_control_mobile.h',
49 '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',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000054 'agc/histogram.cc',
55 'agc/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',
65 'audio_processing_impl.cc',
66 'audio_processing_impl.h',
Michael Graczykdfa36052015-03-25 16:37:27 -070067 'beamformer/beamformer.h',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000068 'beamformer/complex_matrix.h',
69 'beamformer/covariance_matrix_generator.cc',
70 'beamformer/covariance_matrix_generator.h',
71 'beamformer/matrix.h',
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000072 'beamformer/nonlinear_beamformer.cc',
73 'beamformer/nonlinear_beamformer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000074 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000075 'echo_cancellation_impl.cc',
76 'echo_cancellation_impl.h',
77 'echo_control_mobile_impl.cc',
78 'echo_control_mobile_impl.h',
79 'gain_control_impl.cc',
80 'gain_control_impl.h',
81 'high_pass_filter_impl.cc',
82 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000083 'include/audio_processing.h',
ekmdb4fecf2015-06-22 17:49:08 -070084 'intelligibility/intelligibility_enhancer.cc',
85 'intelligibility/intelligibility_enhancer.h',
86 'intelligibility/intelligibility_utils.cc',
87 'intelligibility/intelligibility_utils.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000088 'level_estimator_impl.cc',
89 'level_estimator_impl.h',
peah9e69abf2015-08-28 04:41:25 -070090 'logging/aec_logging.h',
91 'logging/aec_logging_file_handling.cc',
92 'logging/aec_logging_file_handling.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000093 'noise_suppression_impl.cc',
94 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000095 'processing_component.cc',
96 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +000097 'rms_level.cc',
98 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000099 'splitting_filter.cc',
100 'splitting_filter.h',
Alejandro Luebs5a92aa82015-04-27 11:34:45 -0700101 'three_band_filter_bank.cc',
102 'three_band_filter_bank.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000103 'transient/common.h',
104 'transient/daubechies_8_wavelet_coeffs.h',
105 'transient/dyadic_decimator.h',
106 'transient/moving_moments.cc',
107 'transient/moving_moments.h',
108 'transient/transient_detector.cc',
109 'transient/transient_detector.h',
110 'transient/transient_suppressor.cc',
111 'transient/transient_suppressor.h',
112 'transient/wpd_node.cc',
113 'transient/wpd_node.h',
114 'transient/wpd_tree.cc',
115 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000116 'typing_detection.cc',
117 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000118 'utility/delay_estimator.c',
119 'utility/delay_estimator.h',
120 'utility/delay_estimator_internal.h',
121 'utility/delay_estimator_wrapper.c',
122 'utility/delay_estimator_wrapper.h',
aluebsecf6b812015-06-25 12:28:48 -0700123 'vad/common.h',
124 'vad/gmm.cc',
125 'vad/gmm.h',
126 'vad/noise_gmm_tables.h',
127 'vad/pitch_based_vad.cc',
128 'vad/pitch_based_vad.h',
129 'vad/pitch_internal.cc',
130 'vad/pitch_internal.h',
131 'vad/pole_zero_filter.cc',
132 'vad/pole_zero_filter.h',
133 'vad/standalone_vad.cc',
134 'vad/standalone_vad.h',
135 'vad/vad_audio_proc.cc',
136 'vad/vad_audio_proc.h',
137 'vad/vad_audio_proc_internal.h',
138 'vad/vad_circular_buffer.cc',
139 'vad/vad_circular_buffer.h',
140 'vad/voice_activity_detector.cc',
141 'vad/voice_activity_detector.h',
142 'vad/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000143 'voice_detection_impl.cc',
144 'voice_detection_impl.h',
145 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000146 'conditions': [
147 ['aec_debug_dump==1', {
148 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
149 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000150 ['aec_untrusted_delay_for_testing==1', {
151 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
152 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000153 ['agc_debug_dump==1', {
154 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
155 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000156 ['enable_protobuf==1', {
157 'dependencies': ['audioproc_debug_proto'],
158 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
159 }],
160 ['prefer_fixed_point==1', {
161 'defines': ['WEBRTC_NS_FIXED'],
162 'sources': [
163 'ns/include/noise_suppression_x.h',
164 'ns/noise_suppression_x.c',
165 'ns/nsx_core.c',
166 'ns/nsx_core.h',
167 'ns/nsx_defines.h',
168 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000169 'conditions': [
Richard Colesd417c932015-04-09 17:36:12 +0200170 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000171 'sources': [
172 'ns/nsx_core_mips.c',
173 ],
174 }, {
175 'sources': [
176 'ns/nsx_core_c.c',
177 ],
178 }],
179 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000180 }, {
181 'defines': ['WEBRTC_NS_FLOAT'],
182 'sources': [
183 'ns/defines.h',
184 'ns/include/noise_suppression.h',
185 'ns/noise_suppression.c',
186 'ns/ns_core.c',
187 'ns/ns_core.h',
188 'ns/windows_private.h',
189 ],
190 }],
191 ['target_arch=="ia32" or target_arch=="x64"', {
192 'dependencies': ['audio_processing_sse2',],
193 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700194 ['build_with_neon==1', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000195 'dependencies': ['audio_processing_neon',],
196 }],
Richard Colesd417c932015-04-09 17:36:12 +0200197 ['target_arch=="mipsel" and mips_arch_variant!="r6"', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000198 'sources': [
199 'aecm/aecm_core_mips.c',
200 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000201 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000202 ['mips_float_abi=="hard"', {
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000203 'sources': [
204 'aec/aec_core_mips.c',
205 'aec/aec_rdft_mips.c',
206 ],
207 }],
208 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000209 }, {
210 'sources': [
211 'aecm/aecm_core_c.c',
212 ],
213 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000214 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000215 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
216 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000217 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000218 ],
219 'conditions': [
220 ['enable_protobuf==1', {
221 'targets': [
222 {
223 'target_name': 'audioproc_debug_proto',
224 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000225 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000226 'variables': {
227 'proto_in_dir': '.',
228 # Workaround to protect against gyp's pathname relativization when
229 # this file is included by modules.gyp.
230 'proto_out_protected': 'webrtc/audio_processing',
231 'proto_out_dir': '<(proto_out_protected)',
232 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000233 'includes': ['../../build/protoc.gypi',],
234 },
235 ],
236 }],
237 ['target_arch=="ia32" or target_arch=="x64"', {
238 'targets': [
239 {
240 'target_name': 'audio_processing_sse2',
241 'type': 'static_library',
242 'sources': [
243 'aec/aec_core_sse2.c',
244 'aec/aec_rdft_sse2.c',
245 ],
Henrik Kjellanderf2497cf2015-04-16 08:57:16 +0200246 'conditions': [
247 ['os_posix==1', {
248 'cflags': [ '-msse2', ],
249 'xcode_settings': {
250 'OTHER_CFLAGS': [ '-msse2', ],
251 },
252 }],
253 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000254 },
255 ],
256 }],
Andrew MacDonaldac4234c2015-06-24 18:25:54 -0700257 ['build_with_neon==1', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000258 'targets': [{
259 'target_name': 'audio_processing_neon',
260 'type': 'static_library',
261 'includes': ['../../build/arm_neon.gypi',],
262 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000263 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000264 ],
265 'sources': [
bjornv@webrtc.orgaf6f02f2014-06-13 14:50:23 +0000266 'aec/aec_core_neon.c',
bjornv@webrtc.orgcd9b90a2014-06-30 12:05:18 +0000267 'aec/aec_rdft_neon.c',
kma@webrtc.org12454022012-11-07 22:34:31 +0000268 'aecm/aecm_core_neon.c',
269 'ns/nsx_core_neon.c',
270 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000271 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000272 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000273 ],
274}