blob: 664fb2db0f313b95282d6d08653a67251fae349b [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',
29 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
30 '<(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': [
pbos@webrtc.org788acd12014-12-15 09:41:24 +000034 'aec/aec_core.c',
35 'aec/aec_core.h',
36 'aec/aec_core_internal.h',
37 'aec/aec_rdft.c',
38 'aec/aec_rdft.h',
39 'aec/aec_resampler.c',
40 'aec/aec_resampler.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000041 'aec/echo_cancellation.c',
42 'aec/echo_cancellation_internal.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000043 'aec/include/echo_cancellation.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000044 'aecm/aecm_core.c',
45 'aecm/aecm_core.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000046 'aecm/echo_control_mobile.c',
47 'aecm/include/echo_control_mobile.h',
48 'agc/agc.cc',
49 'agc/agc.h',
50 'agc/agc_audio_proc.cc',
51 'agc/agc_audio_proc.h',
52 'agc/agc_audio_proc_internal.h',
53 'agc/agc_manager_direct.cc',
54 'agc/agc_manager_direct.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000055 'agc/circular_buffer.cc',
56 'agc/circular_buffer.h',
57 'agc/common.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000058 'agc/gain_map_internal.h',
59 'agc/gmm.cc',
60 'agc/gmm.h',
61 'agc/histogram.cc',
62 'agc/histogram.h',
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000063 'agc/legacy/analog_agc.c',
64 'agc/legacy/analog_agc.h',
65 'agc/legacy/digital_agc.c',
66 'agc/legacy/digital_agc.h',
67 'agc/legacy/gain_control.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000068 'agc/noise_gmm_tables.h',
69 'agc/pitch_based_vad.cc',
70 'agc/pitch_based_vad.h',
71 'agc/pitch_internal.cc',
72 'agc/pitch_internal.h',
73 'agc/pole_zero_filter.cc',
74 'agc/pole_zero_filter.h',
75 'agc/standalone_vad.cc',
76 'agc/standalone_vad.h',
77 'agc/utility.cc',
78 'agc/utility.h',
79 'agc/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000080 'audio_buffer.cc',
81 'audio_buffer.h',
82 'audio_processing_impl.cc',
83 'audio_processing_impl.h',
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +000084 'beamformer/complex_matrix.h',
85 'beamformer/covariance_matrix_generator.cc',
86 'beamformer/covariance_matrix_generator.h',
87 'beamformer/matrix.h',
aluebs@webrtc.org79b9eba2014-11-26 20:21:38 +000088 'channel_buffer.cc',
89 'channel_buffer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000090 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000091 'echo_cancellation_impl.cc',
92 'echo_cancellation_impl.h',
93 'echo_control_mobile_impl.cc',
94 'echo_control_mobile_impl.h',
95 'gain_control_impl.cc',
96 'gain_control_impl.h',
97 'high_pass_filter_impl.cc',
98 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000099 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000100 'level_estimator_impl.cc',
101 'level_estimator_impl.h',
102 'noise_suppression_impl.cc',
103 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000104 'processing_component.cc',
105 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000106 'rms_level.cc',
107 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000108 'splitting_filter.cc',
109 'splitting_filter.h',
110 'transient/common.h',
111 'transient/daubechies_8_wavelet_coeffs.h',
112 'transient/dyadic_decimator.h',
113 'transient/moving_moments.cc',
114 'transient/moving_moments.h',
115 'transient/transient_detector.cc',
116 'transient/transient_detector.h',
117 'transient/transient_suppressor.cc',
118 'transient/transient_suppressor.h',
119 'transient/wpd_node.cc',
120 'transient/wpd_node.h',
121 'transient/wpd_tree.cc',
122 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000123 'typing_detection.cc',
124 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000125 'utility/delay_estimator.c',
126 'utility/delay_estimator.h',
127 'utility/delay_estimator_internal.h',
128 'utility/delay_estimator_wrapper.c',
129 'utility/delay_estimator_wrapper.h',
130 'utility/fft4g.c',
131 'utility/fft4g.h',
132 'utility/ring_buffer.c',
133 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000134 'voice_detection_impl.cc',
135 'voice_detection_impl.h',
136 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000137 'conditions': [
138 ['aec_debug_dump==1', {
139 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
140 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000141 ['aec_untrusted_delay_for_testing==1', {
142 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
143 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000144 ['agc_debug_dump==1', {
145 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
146 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000147 ['enable_protobuf==1', {
148 'dependencies': ['audioproc_debug_proto'],
149 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
150 }],
151 ['prefer_fixed_point==1', {
152 'defines': ['WEBRTC_NS_FIXED'],
153 'sources': [
154 'ns/include/noise_suppression_x.h',
155 'ns/noise_suppression_x.c',
156 'ns/nsx_core.c',
157 'ns/nsx_core.h',
158 'ns/nsx_defines.h',
159 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000160 'conditions': [
andrew@webrtc.org11533222014-11-21 16:28:32 +0000161 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000162 'sources': [
163 'ns/nsx_core_mips.c',
164 ],
165 }, {
166 'sources': [
167 'ns/nsx_core_c.c',
168 ],
169 }],
170 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000171 }, {
172 'defines': ['WEBRTC_NS_FLOAT'],
173 'sources': [
174 'ns/defines.h',
175 'ns/include/noise_suppression.h',
176 'ns/noise_suppression.c',
177 'ns/ns_core.c',
178 'ns/ns_core.h',
179 'ns/windows_private.h',
180 ],
181 }],
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000182 ['rtc_use_openmax_dl==1', {
aluebs@webrtc.orgae643ce2014-12-19 19:57:34 +0000183 'defines': ['WEBRTC_BEAMFORMER'],
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000184 'sources': [
185 'beamformer/beamformer.cc',
186 'beamformer/beamformer.h',
187 ],
188 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000189 ['target_arch=="ia32" or target_arch=="x64"', {
190 'dependencies': ['audio_processing_sse2',],
191 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000192 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000193 'dependencies': ['audio_processing_neon',],
194 }],
andrew@webrtc.org11533222014-11-21 16:28:32 +0000195 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000196 'sources': [
197 'aecm/aecm_core_mips.c',
198 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000199 'conditions': [
200 ['mips_fpu==1', {
201 'sources': [
202 'aec/aec_core_mips.c',
203 'aec/aec_rdft_mips.c',
204 ],
205 }],
206 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000207 }, {
208 'sources': [
209 'aecm/aecm_core_c.c',
210 ],
211 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000212 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000213 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
214 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000215 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000216 ],
217 'conditions': [
218 ['enable_protobuf==1', {
219 'targets': [
220 {
221 'target_name': 'audioproc_debug_proto',
222 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000223 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000224 'variables': {
225 'proto_in_dir': '.',
226 # Workaround to protect against gyp's pathname relativization when
227 # this file is included by modules.gyp.
228 'proto_out_protected': 'webrtc/audio_processing',
229 'proto_out_dir': '<(proto_out_protected)',
230 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000231 'includes': ['../../build/protoc.gypi',],
232 },
233 ],
234 }],
235 ['target_arch=="ia32" or target_arch=="x64"', {
236 'targets': [
237 {
238 'target_name': 'audio_processing_sse2',
239 'type': 'static_library',
240 'sources': [
241 'aec/aec_core_sse2.c',
242 'aec/aec_rdft_sse2.c',
243 ],
244 'cflags': ['-msse2',],
245 'xcode_settings': {
246 'OTHER_CFLAGS': ['-msse2',],
247 },
248 },
249 ],
250 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000251 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000252 'targets': [{
253 'target_name': 'audio_processing_neon',
254 'type': 'static_library',
255 'includes': ['../../build/arm_neon.gypi',],
256 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000257 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000258 ],
259 'sources': [
bjornv@webrtc.orgaf6f02f2014-06-13 14:50:23 +0000260 'aec/aec_core_neon.c',
bjornv@webrtc.orgcd9b90a2014-06-30 12:05:18 +0000261 'aec/aec_rdft_neon.c',
kma@webrtc.org12454022012-11-07 22:34:31 +0000262 'aecm/aecm_core_neon.c',
263 'ns/nsx_core_neon.c',
264 ],
265 'conditions': [
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000266 # Disable LTO in audio_processing_neon target due to compiler bug
267 ['use_lto==1', {
268 'cflags!': [
269 '-flto',
270 '-ffat-lto-objects',
271 ],
272 }],
kma@webrtc.org12454022012-11-07 22:34:31 +0000273 ],
274 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000275 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000276 ],
277}