blob: c73bb2a4755e11843a0d36be83e3ca8694660a1a [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,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000024
25 # Disables the usual mode where we trust the reported system delay
26 # values the AEC receives. The corresponding define is set appropriately
27 # in the code, but it can be force-enabled here for testing.
28 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000029 },
niklase@google.com470e71d2011-07-07 08:21:25 +000030 'dependencies': [
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000031 '<@(audio_processing_dependencies)',
niklase@google.com470e71d2011-07-07 08:21:25 +000032 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000033 'sources': [
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000034 'aec/include/echo_cancellation.h',
35 'aec/echo_cancellation.c',
36 'aec/echo_cancellation_internal.h',
37 'aec/aec_core.h',
38 'aec/aec_core.c',
bjornv@webrtc.org56a9ec32013-02-20 22:38:47 +000039 'aec/aec_core_internal.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000040 'aec/aec_rdft.h',
41 'aec/aec_rdft.c',
42 'aec/aec_resampler.h',
43 'aec/aec_resampler.c',
44 'aecm/include/echo_control_mobile.h',
45 'aecm/echo_control_mobile.c',
46 'aecm/aecm_core.c',
47 'aecm/aecm_core.h',
48 'agc/include/gain_control.h',
49 'agc/analog_agc.c',
50 'agc/analog_agc.h',
51 'agc/digital_agc.c',
52 'agc/digital_agc.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000053 'audio_buffer.cc',
54 'audio_buffer.h',
55 'audio_processing_impl.cc',
56 'audio_processing_impl.h',
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000057 'common.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000058 'echo_cancellation_impl.cc',
59 'echo_cancellation_impl.h',
60 'echo_control_mobile_impl.cc',
61 'echo_control_mobile_impl.h',
62 'gain_control_impl.cc',
63 'gain_control_impl.h',
64 'high_pass_filter_impl.cc',
65 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000066 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000067 'level_estimator_impl.cc',
68 'level_estimator_impl.h',
69 'noise_suppression_impl.cc',
70 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000071 'processing_component.cc',
72 'processing_component.h',
andrew@webrtc.org382c0c22014-05-05 18:22:21 +000073 'rms_level.cc',
74 'rms_level.h',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +000075 'typing_detection.cc',
76 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000077 'utility/delay_estimator.c',
78 'utility/delay_estimator.h',
79 'utility/delay_estimator_internal.h',
80 'utility/delay_estimator_wrapper.c',
81 'utility/delay_estimator_wrapper.h',
82 'utility/fft4g.c',
83 'utility/fft4g.h',
84 'utility/ring_buffer.c',
85 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000086 'voice_detection_impl.cc',
87 'voice_detection_impl.h',
88 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000089 'conditions': [
90 ['aec_debug_dump==1', {
91 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
92 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +000093 ['aec_untrusted_delay_for_testing==1', {
94 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
95 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000096 ['enable_protobuf==1', {
97 'dependencies': ['audioproc_debug_proto'],
98 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
99 }],
100 ['prefer_fixed_point==1', {
101 'defines': ['WEBRTC_NS_FIXED'],
102 'sources': [
103 'ns/include/noise_suppression_x.h',
104 'ns/noise_suppression_x.c',
105 'ns/nsx_core.c',
106 'ns/nsx_core.h',
107 'ns/nsx_defines.h',
108 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000109 'conditions': [
110 ['target_arch=="mipsel"', {
111 'sources': [
112 'ns/nsx_core_mips.c',
113 ],
114 }, {
115 'sources': [
116 'ns/nsx_core_c.c',
117 ],
118 }],
119 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000120 }, {
121 'defines': ['WEBRTC_NS_FLOAT'],
122 'sources': [
123 'ns/defines.h',
124 'ns/include/noise_suppression.h',
125 'ns/noise_suppression.c',
126 'ns/ns_core.c',
127 'ns/ns_core.h',
128 'ns/windows_private.h',
129 ],
130 }],
131 ['target_arch=="ia32" or target_arch=="x64"', {
132 'dependencies': ['audio_processing_sse2',],
133 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000134 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000135 'dependencies': ['audio_processing_neon',],
136 }],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000137 ['target_arch=="mipsel"', {
138 'sources': [
139 'aecm/aecm_core_mips.c',
140 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000141 'conditions': [
142 ['mips_fpu==1', {
143 'sources': [
144 'aec/aec_core_mips.c',
145 'aec/aec_rdft_mips.c',
146 ],
147 }],
148 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000149 }, {
150 'sources': [
151 'aecm/aecm_core_c.c',
152 ],
153 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000154 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000155 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
156 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000157 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000158 ],
159 'conditions': [
160 ['enable_protobuf==1', {
161 'targets': [
162 {
163 'target_name': 'audioproc_debug_proto',
164 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000165 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000166 'variables': {
167 'proto_in_dir': '.',
168 # Workaround to protect against gyp's pathname relativization when
169 # this file is included by modules.gyp.
170 'proto_out_protected': 'webrtc/audio_processing',
171 'proto_out_dir': '<(proto_out_protected)',
172 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000173 'includes': ['../../build/protoc.gypi',],
174 },
175 ],
176 }],
177 ['target_arch=="ia32" or target_arch=="x64"', {
178 'targets': [
179 {
180 'target_name': 'audio_processing_sse2',
181 'type': 'static_library',
182 'sources': [
183 'aec/aec_core_sse2.c',
184 'aec/aec_rdft_sse2.c',
185 ],
186 'cflags': ['-msse2',],
187 'xcode_settings': {
188 'OTHER_CFLAGS': ['-msse2',],
189 },
190 },
191 ],
192 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000193 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000194 'targets': [{
195 'target_name': 'audio_processing_neon',
196 'type': 'static_library',
197 'includes': ['../../build/arm_neon.gypi',],
198 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000199 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000200 ],
201 'sources': [
202 'aecm/aecm_core_neon.c',
203 'ns/nsx_core_neon.c',
204 ],
205 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000206 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000207 'dependencies': [
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000208 '<(gen_core_neon_offsets_gyp):*',
kma@webrtc.org12454022012-11-07 22:34:31 +0000209 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000210 'sources': [
211 'aecm/aecm_core_neon.S',
212 'ns/nsx_core_neon.S',
213 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000214 'include_dirs': [
215 '<(shared_generated_dir)',
216 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000217 'sources!': [
218 'aecm/aecm_core_neon.c',
219 'ns/nsx_core_neon.c',
220 ],
221 'includes!': ['../../build/arm_neon.gypi',],
222 }],
223 ],
224 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000225 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000226 ],
227}