blob: 9bbcfae7f86a7a4db1e0b5db1eeb7d5bf636f925 [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': [
12 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
13 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
14 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +000015 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000016 },
niklase@google.com470e71d2011-07-07 08:21:25 +000017 'targets': [
18 {
19 'target_name': 'audio_processing',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000020 'type': 'static_library',
21 'variables': {
22 # Outputs some low-level debug files.
23 'aec_debug_dump%': 0,
bjornv@webrtc.orgea297872014-09-23 11:21:39 +000024 'agc_debug_dump%': 0,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000025
26 # Disables the usual mode where we trust the reported system delay
27 # values the AEC receives. The corresponding define is set appropriately
28 # in the code, but it can be force-enabled here for testing.
29 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000030 },
niklase@google.com470e71d2011-07-07 08:21:25 +000031 'dependencies': [
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000032 '<@(audio_processing_dependencies)',
niklase@google.com470e71d2011-07-07 08:21:25 +000033 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000034 'sources': [
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000035 'aec/include/echo_cancellation.h',
36 'aec/echo_cancellation.c',
37 'aec/echo_cancellation_internal.h',
38 'aec/aec_core.h',
39 'aec/aec_core.c',
bjornv@webrtc.org56a9ec32013-02-20 22:38:47 +000040 'aec/aec_core_internal.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000041 'aec/aec_rdft.h',
42 'aec/aec_rdft.c',
43 'aec/aec_resampler.h',
44 'aec/aec_resampler.c',
45 'aecm/include/echo_control_mobile.h',
46 'aecm/echo_control_mobile.c',
47 'aecm/aecm_core.c',
48 'aecm/aecm_core.h',
49 'agc/include/gain_control.h',
50 'agc/analog_agc.c',
51 'agc/analog_agc.h',
52 'agc/digital_agc.c',
53 'agc/digital_agc.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000054 'audio_buffer.cc',
55 'audio_buffer.h',
56 'audio_processing_impl.cc',
57 'audio_processing_impl.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000058 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000059 'echo_cancellation_impl.cc',
60 'echo_cancellation_impl.h',
61 'echo_control_mobile_impl.cc',
62 'echo_control_mobile_impl.h',
63 'gain_control_impl.cc',
64 'gain_control_impl.h',
65 'high_pass_filter_impl.cc',
66 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000067 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000068 'level_estimator_impl.cc',
69 'level_estimator_impl.h',
70 'noise_suppression_impl.cc',
71 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000072 'processing_component.cc',
73 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +000074 'rms_level.cc',
75 'rms_level.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +000076 'typing_detection.cc',
77 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000078 'utility/delay_estimator.c',
79 'utility/delay_estimator.h',
80 'utility/delay_estimator_internal.h',
81 'utility/delay_estimator_wrapper.c',
82 'utility/delay_estimator_wrapper.h',
83 'utility/fft4g.c',
84 'utility/fft4g.h',
85 'utility/ring_buffer.c',
86 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000087 'voice_detection_impl.cc',
88 'voice_detection_impl.h',
89 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000090 'conditions': [
91 ['aec_debug_dump==1', {
92 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
93 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +000094 ['aec_untrusted_delay_for_testing==1', {
95 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
96 }],
bjornv@webrtc.orgea297872014-09-23 11:21:39 +000097 ['agc_debug_dump==1', {
98 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
99 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000100 ['enable_protobuf==1', {
101 'dependencies': ['audioproc_debug_proto'],
102 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
103 }],
104 ['prefer_fixed_point==1', {
105 'defines': ['WEBRTC_NS_FIXED'],
106 'sources': [
107 'ns/include/noise_suppression_x.h',
108 'ns/noise_suppression_x.c',
109 'ns/nsx_core.c',
110 'ns/nsx_core.h',
111 'ns/nsx_defines.h',
112 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000113 'conditions': [
114 ['target_arch=="mipsel"', {
115 'sources': [
116 'ns/nsx_core_mips.c',
117 ],
118 }, {
119 'sources': [
120 'ns/nsx_core_c.c',
121 ],
122 }],
123 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000124 }, {
125 'defines': ['WEBRTC_NS_FLOAT'],
126 'sources': [
127 'ns/defines.h',
128 'ns/include/noise_suppression.h',
129 'ns/noise_suppression.c',
130 'ns/ns_core.c',
131 'ns/ns_core.h',
132 'ns/windows_private.h',
133 ],
134 }],
135 ['target_arch=="ia32" or target_arch=="x64"', {
136 'dependencies': ['audio_processing_sse2',],
137 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000138 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000139 'dependencies': ['audio_processing_neon',],
140 }],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000141 ['target_arch=="mipsel"', {
142 'sources': [
143 'aecm/aecm_core_mips.c',
144 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000145 'conditions': [
146 ['mips_fpu==1', {
147 'sources': [
148 'aec/aec_core_mips.c',
149 'aec/aec_rdft_mips.c',
150 ],
151 }],
152 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000153 }, {
154 'sources': [
155 'aecm/aecm_core_c.c',
156 ],
157 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000158 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000159 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
160 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000161 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000162 ],
163 'conditions': [
164 ['enable_protobuf==1', {
165 'targets': [
166 {
167 'target_name': 'audioproc_debug_proto',
168 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000169 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000170 'variables': {
171 'proto_in_dir': '.',
172 # Workaround to protect against gyp's pathname relativization when
173 # this file is included by modules.gyp.
174 'proto_out_protected': 'webrtc/audio_processing',
175 'proto_out_dir': '<(proto_out_protected)',
176 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000177 'includes': ['../../build/protoc.gypi',],
178 },
179 ],
180 }],
181 ['target_arch=="ia32" or target_arch=="x64"', {
182 'targets': [
183 {
184 'target_name': 'audio_processing_sse2',
185 'type': 'static_library',
186 'sources': [
187 'aec/aec_core_sse2.c',
188 'aec/aec_rdft_sse2.c',
189 ],
190 'cflags': ['-msse2',],
191 'xcode_settings': {
192 'OTHER_CFLAGS': ['-msse2',],
193 },
194 },
195 ],
196 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000197 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000198 'targets': [{
199 'target_name': 'audio_processing_neon',
200 'type': 'static_library',
201 'includes': ['../../build/arm_neon.gypi',],
202 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000203 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000204 ],
205 'sources': [
bjornv@webrtc.orgaf6f02f2014-06-13 14:50:23 +0000206 'aec/aec_core_neon.c',
bjornv@webrtc.orgcd9b90a2014-06-30 12:05:18 +0000207 'aec/aec_rdft_neon.c',
kma@webrtc.org12454022012-11-07 22:34:31 +0000208 'aecm/aecm_core_neon.c',
209 'ns/nsx_core_neon.c',
210 ],
211 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000212 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000213 'dependencies': [
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000214 '<(gen_core_neon_offsets_gyp):*',
kma@webrtc.org12454022012-11-07 22:34:31 +0000215 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000216 'sources': [
217 'aecm/aecm_core_neon.S',
218 'ns/nsx_core_neon.S',
219 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000220 'include_dirs': [
221 '<(shared_generated_dir)',
222 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000223 'sources!': [
224 'aecm/aecm_core_neon.c',
225 'ns/nsx_core_neon.c',
226 ],
227 'includes!': ['../../build/arm_neon.gypi',],
228 }],
andrew@webrtc.orgaf7fdfc2014-08-29 17:41:13 +0000229 # Disable LTO in audio_processing_neon target due to compiler bug
230 ['use_lto==1', {
231 'cflags!': [
232 '-flto',
233 '-ffat-lto-objects',
234 ],
235 }],
kma@webrtc.org12454022012-11-07 22:34:31 +0000236 ],
237 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000238 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000239 ],
240}