blob: 0b19fd9ad21d4d2b1c5746e78b780b1cff16e216 [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',
31 '<(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',
51 'agc/agc_audio_proc.cc',
52 'agc/agc_audio_proc.h',
53 'agc/agc_audio_proc_internal.h',
54 'agc/agc_manager_direct.cc',
55 'agc/agc_manager_direct.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000056 'agc/circular_buffer.cc',
57 'agc/circular_buffer.h',
58 'agc/common.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000059 'agc/gain_map_internal.h',
60 'agc/gmm.cc',
61 'agc/gmm.h',
62 'agc/histogram.cc',
63 'agc/histogram.h',
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000064 'agc/legacy/analog_agc.c',
65 'agc/legacy/analog_agc.h',
66 'agc/legacy/digital_agc.c',
67 'agc/legacy/digital_agc.h',
68 'agc/legacy/gain_control.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000069 'agc/noise_gmm_tables.h',
70 'agc/pitch_based_vad.cc',
71 'agc/pitch_based_vad.h',
72 'agc/pitch_internal.cc',
73 'agc/pitch_internal.h',
74 'agc/pole_zero_filter.cc',
75 'agc/pole_zero_filter.h',
76 'agc/standalone_vad.cc',
77 'agc/standalone_vad.h',
78 'agc/utility.cc',
79 'agc/utility.h',
80 'agc/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000081 'audio_buffer.cc',
82 'audio_buffer.h',
83 'audio_processing_impl.cc',
84 'audio_processing_impl.h',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000085 'beamformer/complex_matrix.h',
86 'beamformer/covariance_matrix_generator.cc',
87 'beamformer/covariance_matrix_generator.h',
88 'beamformer/matrix.h',
andrew@webrtc.orgbd8c8652015-03-20 00:28:22 +000089 'beamformer/nonlinear_beamformer.cc',
90 'beamformer/nonlinear_beamformer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000091 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000092 'echo_cancellation_impl.cc',
93 'echo_cancellation_impl.h',
94 'echo_control_mobile_impl.cc',
95 'echo_control_mobile_impl.h',
96 'gain_control_impl.cc',
97 'gain_control_impl.h',
98 'high_pass_filter_impl.cc',
99 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000100 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000101 'level_estimator_impl.cc',
102 'level_estimator_impl.h',
103 'noise_suppression_impl.cc',
104 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000105 'processing_component.cc',
106 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000107 'rms_level.cc',
108 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000109 'splitting_filter.cc',
110 'splitting_filter.h',
111 'transient/common.h',
112 'transient/daubechies_8_wavelet_coeffs.h',
113 'transient/dyadic_decimator.h',
114 'transient/moving_moments.cc',
115 'transient/moving_moments.h',
116 'transient/transient_detector.cc',
117 'transient/transient_detector.h',
118 'transient/transient_suppressor.cc',
119 'transient/transient_suppressor.h',
120 'transient/wpd_node.cc',
121 'transient/wpd_node.h',
122 'transient/wpd_tree.cc',
123 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000124 'typing_detection.cc',
125 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000126 'utility/delay_estimator.c',
127 'utility/delay_estimator.h',
128 'utility/delay_estimator_internal.h',
129 'utility/delay_estimator_wrapper.c',
130 'utility/delay_estimator_wrapper.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000131 'voice_detection_impl.cc',
132 'voice_detection_impl.h',
133 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000134 'conditions': [
135 ['aec_debug_dump==1', {
136 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
137 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000138 ['aec_untrusted_delay_for_testing==1', {
139 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
140 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000141 ['agc_debug_dump==1', {
142 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
143 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000144 ['enable_protobuf==1', {
145 'dependencies': ['audioproc_debug_proto'],
146 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
147 }],
148 ['prefer_fixed_point==1', {
149 'defines': ['WEBRTC_NS_FIXED'],
150 'sources': [
151 'ns/include/noise_suppression_x.h',
152 'ns/noise_suppression_x.c',
153 'ns/nsx_core.c',
154 'ns/nsx_core.h',
155 'ns/nsx_defines.h',
156 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000157 'conditions': [
andrew@webrtc.org11533222014-11-21 16:28:32 +0000158 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000159 'sources': [
160 'ns/nsx_core_mips.c',
161 ],
162 }, {
163 'sources': [
164 'ns/nsx_core_c.c',
165 ],
166 }],
167 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000168 }, {
169 'defines': ['WEBRTC_NS_FLOAT'],
170 'sources': [
171 'ns/defines.h',
172 'ns/include/noise_suppression.h',
173 'ns/noise_suppression.c',
174 'ns/ns_core.c',
175 'ns/ns_core.h',
176 'ns/windows_private.h',
177 ],
178 }],
179 ['target_arch=="ia32" or target_arch=="x64"', {
180 'dependencies': ['audio_processing_sse2',],
181 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000182 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000183 'dependencies': ['audio_processing_neon',],
184 }],
andrew@webrtc.org11533222014-11-21 16:28:32 +0000185 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000186 'sources': [
187 'aecm/aecm_core_mips.c',
188 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000189 'conditions': [
kjellander@webrtc.org6dab6d72015-03-04 09:50:31 +0000190 ['mips_float_abi=="hard"', {
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000191 'sources': [
192 'aec/aec_core_mips.c',
193 'aec/aec_rdft_mips.c',
194 ],
195 }],
196 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000197 }, {
198 'sources': [
199 'aecm/aecm_core_c.c',
200 ],
201 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000202 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000203 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
204 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000205 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000206 ],
207 'conditions': [
208 ['enable_protobuf==1', {
209 'targets': [
210 {
211 'target_name': 'audioproc_debug_proto',
212 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000213 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000214 'variables': {
215 'proto_in_dir': '.',
216 # Workaround to protect against gyp's pathname relativization when
217 # this file is included by modules.gyp.
218 'proto_out_protected': 'webrtc/audio_processing',
219 'proto_out_dir': '<(proto_out_protected)',
220 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000221 'includes': ['../../build/protoc.gypi',],
222 },
223 ],
224 }],
225 ['target_arch=="ia32" or target_arch=="x64"', {
226 'targets': [
227 {
228 'target_name': 'audio_processing_sse2',
229 'type': 'static_library',
230 'sources': [
231 'aec/aec_core_sse2.c',
232 'aec/aec_rdft_sse2.c',
233 ],
234 'cflags': ['-msse2',],
235 'xcode_settings': {
236 'OTHER_CFLAGS': ['-msse2',],
237 },
238 },
239 ],
240 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000241 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000242 'targets': [{
243 'target_name': 'audio_processing_neon',
244 'type': 'static_library',
245 'includes': ['../../build/arm_neon.gypi',],
246 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000247 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000248 ],
249 'sources': [
bjornv@webrtc.orgaf6f02f2014-06-13 14:50:23 +0000250 'aec/aec_core_neon.c',
bjornv@webrtc.orgcd9b90a2014-06-30 12:05:18 +0000251 'aec/aec_rdft_neon.c',
kma@webrtc.org12454022012-11-07 22:34:31 +0000252 'aecm/aecm_core_neon.c',
253 'ns/nsx_core_neon.c',
254 ],
255 'conditions': [
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000256 # Disable LTO in audio_processing_neon target due to compiler bug
257 ['use_lto==1', {
258 'cflags!': [
259 '-flto',
260 '-ffat-lto-objects',
261 ],
262 }],
kma@webrtc.org12454022012-11-07 22:34:31 +0000263 ],
264 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000265 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000266 ],
267}