blob: 3feb9d0e22daefe959f4fbd6f0910bc7aee4b4c2 [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',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000088 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000089 'echo_cancellation_impl.cc',
90 'echo_cancellation_impl.h',
91 'echo_control_mobile_impl.cc',
92 'echo_control_mobile_impl.h',
93 'gain_control_impl.cc',
94 'gain_control_impl.h',
95 'high_pass_filter_impl.cc',
96 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000097 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000098 'level_estimator_impl.cc',
99 'level_estimator_impl.h',
100 'noise_suppression_impl.cc',
101 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000102 'processing_component.cc',
103 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000104 'rms_level.cc',
105 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000106 'splitting_filter.cc',
107 'splitting_filter.h',
108 'transient/common.h',
109 'transient/daubechies_8_wavelet_coeffs.h',
110 'transient/dyadic_decimator.h',
111 'transient/moving_moments.cc',
112 'transient/moving_moments.h',
113 'transient/transient_detector.cc',
114 'transient/transient_detector.h',
115 'transient/transient_suppressor.cc',
116 'transient/transient_suppressor.h',
117 'transient/wpd_node.cc',
118 'transient/wpd_node.h',
119 'transient/wpd_tree.cc',
120 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000121 'typing_detection.cc',
122 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000123 'utility/delay_estimator.c',
124 'utility/delay_estimator.h',
125 'utility/delay_estimator_internal.h',
126 'utility/delay_estimator_wrapper.c',
127 'utility/delay_estimator_wrapper.h',
128 'utility/fft4g.c',
129 'utility/fft4g.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000130 'voice_detection_impl.cc',
131 'voice_detection_impl.h',
132 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000133 'conditions': [
134 ['aec_debug_dump==1', {
135 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
136 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000137 ['aec_untrusted_delay_for_testing==1', {
138 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
139 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000140 ['agc_debug_dump==1', {
141 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
142 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000143 ['enable_protobuf==1', {
144 'dependencies': ['audioproc_debug_proto'],
145 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
146 }],
147 ['prefer_fixed_point==1', {
148 'defines': ['WEBRTC_NS_FIXED'],
149 'sources': [
150 'ns/include/noise_suppression_x.h',
151 'ns/noise_suppression_x.c',
152 'ns/nsx_core.c',
153 'ns/nsx_core.h',
154 'ns/nsx_defines.h',
155 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000156 'conditions': [
andrew@webrtc.org11533222014-11-21 16:28:32 +0000157 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000158 'sources': [
159 'ns/nsx_core_mips.c',
160 ],
161 }, {
162 'sources': [
163 'ns/nsx_core_c.c',
164 ],
165 }],
166 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000167 }, {
168 'defines': ['WEBRTC_NS_FLOAT'],
169 'sources': [
170 'ns/defines.h',
171 'ns/include/noise_suppression.h',
172 'ns/noise_suppression.c',
173 'ns/ns_core.c',
174 'ns/ns_core.h',
175 'ns/windows_private.h',
176 ],
177 }],
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000178 ['rtc_use_openmax_dl==1', {
aluebs@webrtc.orgae643ce2014-12-19 19:57:34 +0000179 'defines': ['WEBRTC_BEAMFORMER'],
aluebs@webrtc.org0c39e912014-12-18 22:22:04 +0000180 'sources': [
181 'beamformer/beamformer.cc',
182 'beamformer/beamformer.h',
183 ],
184 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000185 ['target_arch=="ia32" or target_arch=="x64"', {
186 'dependencies': ['audio_processing_sse2',],
187 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000188 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000189 'dependencies': ['audio_processing_neon',],
190 }],
andrew@webrtc.org11533222014-11-21 16:28:32 +0000191 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000192 'sources': [
193 'aecm/aecm_core_mips.c',
194 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000195 'conditions': [
196 ['mips_fpu==1', {
197 'sources': [
198 'aec/aec_core_mips.c',
199 'aec/aec_rdft_mips.c',
200 ],
201 }],
202 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000203 }, {
204 'sources': [
205 'aecm/aecm_core_c.c',
206 ],
207 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000208 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000209 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
210 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000211 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000212 ],
213 'conditions': [
214 ['enable_protobuf==1', {
215 'targets': [
216 {
217 'target_name': 'audioproc_debug_proto',
218 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000219 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000220 'variables': {
221 'proto_in_dir': '.',
222 # Workaround to protect against gyp's pathname relativization when
223 # this file is included by modules.gyp.
224 'proto_out_protected': 'webrtc/audio_processing',
225 'proto_out_dir': '<(proto_out_protected)',
226 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000227 'includes': ['../../build/protoc.gypi',],
228 },
229 ],
230 }],
231 ['target_arch=="ia32" or target_arch=="x64"', {
232 'targets': [
233 {
234 'target_name': 'audio_processing_sse2',
235 'type': 'static_library',
236 'sources': [
237 'aec/aec_core_sse2.c',
238 'aec/aec_rdft_sse2.c',
239 ],
240 'cflags': ['-msse2',],
241 'xcode_settings': {
242 'OTHER_CFLAGS': ['-msse2',],
243 },
244 },
245 ],
246 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000247 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000248 'targets': [{
249 'target_name': 'audio_processing_neon',
250 'type': 'static_library',
251 'includes': ['../../build/arm_neon.gypi',],
252 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000253 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000254 ],
255 'sources': [
bjornv@webrtc.orgaf6f02f2014-06-13 14:50:23 +0000256 'aec/aec_core_neon.c',
bjornv@webrtc.orgcd9b90a2014-06-30 12:05:18 +0000257 'aec/aec_rdft_neon.c',
kma@webrtc.org12454022012-11-07 22:34:31 +0000258 'aecm/aecm_core_neon.c',
259 'ns/nsx_core_neon.c',
260 ],
261 'conditions': [
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000262 # Disable LTO in audio_processing_neon target due to compiler bug
263 ['use_lto==1', {
264 'cflags!': [
265 '-flto',
266 '-ffat-lto-objects',
267 ],
268 }],
kma@webrtc.org12454022012-11-07 22:34:31 +0000269 ],
270 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000271 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000272 ],
273}