blob: 70c549c09d2a6891d5f452ac8d4957775d67e414 [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': {
11 'audio_processing_dependencies': [
xians@webrtc.orge46bc772014-10-10 08:36:56 +000012 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000013 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
pbos@webrtc.org3440fe12014-12-15 10:56:50 +000014 '<(webrtc_root)/modules/modules.gyp:iSAC',
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000015 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
16 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +000017 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000018 },
niklase@google.com470e71d2011-07-07 08:21:25 +000019 'targets': [
20 {
21 'target_name': 'audio_processing',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000022 'type': 'static_library',
23 'variables': {
24 # Outputs some low-level debug files.
25 'aec_debug_dump%': 0,
bjornv@webrtc.orgea297872014-09-23 11:21:39 +000026 'agc_debug_dump%': 0,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000027
28 # Disables the usual mode where we trust the reported system delay
29 # values the AEC receives. The corresponding define is set appropriately
30 # in the code, but it can be force-enabled here for testing.
31 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000032 },
niklase@google.com470e71d2011-07-07 08:21:25 +000033 'dependencies': [
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000034 '<@(audio_processing_dependencies)',
niklase@google.com470e71d2011-07-07 08:21:25 +000035 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000036 'sources': [
pbos@webrtc.org788acd12014-12-15 09:41:24 +000037 'aec/aec_core.c',
38 'aec/aec_core.h',
39 'aec/aec_core_internal.h',
40 'aec/aec_rdft.c',
41 'aec/aec_rdft.h',
42 'aec/aec_resampler.c',
43 'aec/aec_resampler.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000044 'aec/echo_cancellation.c',
45 'aec/echo_cancellation_internal.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000046 'aec/include/echo_cancellation.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000047 'aecm/aecm_core.c',
48 'aecm/aecm_core.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000049 'aecm/echo_control_mobile.c',
50 'aecm/include/echo_control_mobile.h',
51 'agc/agc.cc',
52 'agc/agc.h',
53 'agc/agc_audio_proc.cc',
54 'agc/agc_audio_proc.h',
55 'agc/agc_audio_proc_internal.h',
56 'agc/agc_manager_direct.cc',
57 'agc/agc_manager_direct.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000058 'agc/circular_buffer.cc',
59 'agc/circular_buffer.h',
60 'agc/common.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000061 'agc/gain_map_internal.h',
62 'agc/gmm.cc',
63 'agc/gmm.h',
64 'agc/histogram.cc',
65 'agc/histogram.h',
bjornv@webrtc.orgb395a5e2014-12-16 10:38:10 +000066 'agc/legacy/analog_agc.c',
67 'agc/legacy/analog_agc.h',
68 'agc/legacy/digital_agc.c',
69 'agc/legacy/digital_agc.h',
70 'agc/legacy/gain_control.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +000071 'agc/noise_gmm_tables.h',
72 'agc/pitch_based_vad.cc',
73 'agc/pitch_based_vad.h',
74 'agc/pitch_internal.cc',
75 'agc/pitch_internal.h',
76 'agc/pole_zero_filter.cc',
77 'agc/pole_zero_filter.h',
78 'agc/standalone_vad.cc',
79 'agc/standalone_vad.h',
80 'agc/utility.cc',
81 'agc/utility.h',
82 'agc/voice_gmm_tables.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000083 'audio_buffer.cc',
84 'audio_buffer.h',
85 'audio_processing_impl.cc',
86 'audio_processing_impl.h',
aluebs@webrtc.org79b9eba2014-11-26 20:21:38 +000087 'channel_buffer.cc',
88 'channel_buffer.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000089 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000090 'echo_cancellation_impl.cc',
91 'echo_cancellation_impl.h',
92 'echo_control_mobile_impl.cc',
93 'echo_control_mobile_impl.h',
94 'gain_control_impl.cc',
95 'gain_control_impl.h',
96 'high_pass_filter_impl.cc',
97 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000098 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000099 'level_estimator_impl.cc',
100 'level_estimator_impl.h',
101 'noise_suppression_impl.cc',
102 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000103 'processing_component.cc',
104 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +0000105 'rms_level.cc',
106 'rms_level.h',
pbos@webrtc.org788acd12014-12-15 09:41:24 +0000107 'splitting_filter.cc',
108 'splitting_filter.h',
109 'transient/common.h',
110 'transient/daubechies_8_wavelet_coeffs.h',
111 'transient/dyadic_decimator.h',
112 'transient/moving_moments.cc',
113 'transient/moving_moments.h',
114 'transient/transient_detector.cc',
115 'transient/transient_detector.h',
116 'transient/transient_suppressor.cc',
117 'transient/transient_suppressor.h',
118 'transient/wpd_node.cc',
119 'transient/wpd_node.h',
120 'transient/wpd_tree.cc',
121 'transient/wpd_tree.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +0000122 'typing_detection.cc',
123 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000124 'utility/delay_estimator.c',
125 'utility/delay_estimator.h',
126 'utility/delay_estimator_internal.h',
127 'utility/delay_estimator_wrapper.c',
128 'utility/delay_estimator_wrapper.h',
129 'utility/fft4g.c',
130 'utility/fft4g.h',
131 'utility/ring_buffer.c',
132 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +0000133 'voice_detection_impl.cc',
134 'voice_detection_impl.h',
135 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000136 'conditions': [
137 ['aec_debug_dump==1', {
138 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
139 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +0000140 ['aec_untrusted_delay_for_testing==1', {
141 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
142 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +0000143 ['agc_debug_dump==1', {
144 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
145 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000146 ['enable_protobuf==1', {
147 'dependencies': ['audioproc_debug_proto'],
148 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
149 }],
150 ['prefer_fixed_point==1', {
151 'defines': ['WEBRTC_NS_FIXED'],
152 'sources': [
153 'ns/include/noise_suppression_x.h',
154 'ns/noise_suppression_x.c',
155 'ns/nsx_core.c',
156 'ns/nsx_core.h',
157 'ns/nsx_defines.h',
158 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000159 'conditions': [
andrew@webrtc.org11533222014-11-21 16:28:32 +0000160 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000161 'sources': [
162 'ns/nsx_core_mips.c',
163 ],
164 }, {
165 'sources': [
166 'ns/nsx_core_c.c',
167 ],
168 }],
169 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000170 }, {
171 'defines': ['WEBRTC_NS_FLOAT'],
172 'sources': [
173 'ns/defines.h',
174 'ns/include/noise_suppression.h',
175 'ns/noise_suppression.c',
176 'ns/ns_core.c',
177 'ns/ns_core.h',
178 'ns/windows_private.h',
179 ],
180 }],
181 ['target_arch=="ia32" or target_arch=="x64"', {
182 'dependencies': ['audio_processing_sse2',],
183 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000184 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000185 'dependencies': ['audio_processing_neon',],
186 }],
andrew@webrtc.org11533222014-11-21 16:28:32 +0000187 ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000188 'sources': [
189 'aecm/aecm_core_mips.c',
190 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000191 'conditions': [
192 ['mips_fpu==1', {
193 'sources': [
194 'aec/aec_core_mips.c',
195 'aec/aec_rdft_mips.c',
196 ],
197 }],
198 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000199 }, {
200 'sources': [
201 'aecm/aecm_core_c.c',
202 ],
203 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000204 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000205 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
206 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000207 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000208 ],
209 'conditions': [
210 ['enable_protobuf==1', {
211 'targets': [
212 {
213 'target_name': 'audioproc_debug_proto',
214 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000215 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000216 'variables': {
217 'proto_in_dir': '.',
218 # Workaround to protect against gyp's pathname relativization when
219 # this file is included by modules.gyp.
220 'proto_out_protected': 'webrtc/audio_processing',
221 'proto_out_dir': '<(proto_out_protected)',
222 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000223 'includes': ['../../build/protoc.gypi',],
224 },
225 ],
226 }],
227 ['target_arch=="ia32" or target_arch=="x64"', {
228 'targets': [
229 {
230 'target_name': 'audio_processing_sse2',
231 'type': 'static_library',
232 'sources': [
233 'aec/aec_core_sse2.c',
234 'aec/aec_rdft_sse2.c',
235 ],
236 'cflags': ['-msse2',],
237 'xcode_settings': {
238 'OTHER_CFLAGS': ['-msse2',],
239 },
240 },
241 ],
242 }],
andrew@webrtc.org1090a6e2014-12-18 21:36:18 +0000243 ['(target_arch=="arm" and arm_version>=7) or target_arch=="arm64"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000244 'targets': [{
245 'target_name': 'audio_processing_neon',
246 'type': 'static_library',
247 'includes': ['../../build/arm_neon.gypi',],
248 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000249 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000250 ],
251 'sources': [
bjornv@webrtc.orgaf6f02f2014-06-13 14:50:23 +0000252 'aec/aec_core_neon.c',
bjornv@webrtc.orgcd9b90a2014-06-30 12:05:18 +0000253 'aec/aec_rdft_neon.c',
kma@webrtc.org12454022012-11-07 22:34:31 +0000254 'aecm/aecm_core_neon.c',
255 'ns/nsx_core_neon.c',
256 ],
257 'conditions': [
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000258 # Disable LTO in audio_processing_neon target due to compiler bug
259 ['use_lto==1', {
260 'cflags!': [
261 '-flto',
262 '-ffat-lto-objects',
263 ],
264 }],
kma@webrtc.org12454022012-11-07 22:34:31 +0000265 ],
266 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000267 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000268 ],
269}