blob: 1f3f7052fc3635e6595fa93041ea33a46e0fa38d [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 ],
15 },
niklase@google.com470e71d2011-07-07 08:21:25 +000016 'targets': [
17 {
18 'target_name': 'audio_processing',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000019 'type': 'static_library',
20 'variables': {
21 # Outputs some low-level debug files.
22 'aec_debug_dump%': 0,
andrew@webrtc.org1760a172013-09-25 23:17:38 +000023
24 # Disables the usual mode where we trust the reported system delay
25 # values the AEC receives. The corresponding define is set appropriately
26 # in the code, but it can be force-enabled here for testing.
27 'aec_untrusted_delay_for_testing%': 0,
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000028 },
niklase@google.com470e71d2011-07-07 08:21:25 +000029 'dependencies': [
andrew@webrtc.orgb0730102013-11-11 17:20:27 +000030 '<@(audio_processing_dependencies)',
niklase@google.com470e71d2011-07-07 08:21:25 +000031 ],
niklase@google.com470e71d2011-07-07 08:21:25 +000032 'sources': [
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000033 'aec/include/echo_cancellation.h',
34 'aec/echo_cancellation.c',
35 'aec/echo_cancellation_internal.h',
36 'aec/aec_core.h',
37 'aec/aec_core.c',
bjornv@webrtc.org56a9ec32013-02-20 22:38:47 +000038 'aec/aec_core_internal.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000039 'aec/aec_rdft.h',
40 'aec/aec_rdft.c',
41 'aec/aec_resampler.h',
42 'aec/aec_resampler.c',
43 'aecm/include/echo_control_mobile.h',
44 'aecm/echo_control_mobile.c',
45 'aecm/aecm_core.c',
46 'aecm/aecm_core.h',
47 'agc/include/gain_control.h',
48 'agc/analog_agc.c',
49 'agc/analog_agc.h',
50 'agc/digital_agc.c',
51 'agc/digital_agc.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000052 'audio_buffer.cc',
53 'audio_buffer.h',
54 'audio_processing_impl.cc',
55 'audio_processing_impl.h',
56 'echo_cancellation_impl.cc',
57 'echo_cancellation_impl.h',
andrew@webrtc.org61e596f2013-07-25 18:28:29 +000058 'echo_cancellation_impl_wrapper.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000059 'echo_control_mobile_impl.cc',
60 'echo_control_mobile_impl.h',
61 'gain_control_impl.cc',
62 'gain_control_impl.h',
63 'high_pass_filter_impl.cc',
64 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000065 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000066 'level_estimator_impl.cc',
67 'level_estimator_impl.h',
68 'noise_suppression_impl.cc',
69 'noise_suppression_impl.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000070 'processing_component.cc',
71 'processing_component.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000072 'utility/delay_estimator.c',
73 'utility/delay_estimator.h',
74 'utility/delay_estimator_internal.h',
75 'utility/delay_estimator_wrapper.c',
76 'utility/delay_estimator_wrapper.h',
77 'utility/fft4g.c',
78 'utility/fft4g.h',
79 'utility/ring_buffer.c',
80 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000081 'voice_detection_impl.cc',
82 'voice_detection_impl.h',
83 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000084 'conditions': [
85 ['aec_debug_dump==1', {
86 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
87 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +000088 ['aec_untrusted_delay_for_testing==1', {
89 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
90 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000091 ['enable_protobuf==1', {
92 'dependencies': ['audioproc_debug_proto'],
93 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
94 }],
95 ['prefer_fixed_point==1', {
96 'defines': ['WEBRTC_NS_FIXED'],
97 'sources': [
98 'ns/include/noise_suppression_x.h',
99 'ns/noise_suppression_x.c',
100 'ns/nsx_core.c',
101 'ns/nsx_core.h',
102 'ns/nsx_defines.h',
103 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000104 'conditions': [
105 ['target_arch=="mipsel"', {
106 'sources': [
107 'ns/nsx_core_mips.c',
108 ],
109 }, {
110 'sources': [
111 'ns/nsx_core_c.c',
112 ],
113 }],
114 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000115 }, {
116 'defines': ['WEBRTC_NS_FLOAT'],
117 'sources': [
118 'ns/defines.h',
119 'ns/include/noise_suppression.h',
120 'ns/noise_suppression.c',
121 'ns/ns_core.c',
122 'ns/ns_core.h',
123 'ns/windows_private.h',
124 ],
125 }],
126 ['target_arch=="ia32" or target_arch=="x64"', {
127 'dependencies': ['audio_processing_sse2',],
128 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000129 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000130 'dependencies': ['audio_processing_neon',],
131 }],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000132 ['target_arch=="mipsel"', {
133 'sources': [
134 'aecm/aecm_core_mips.c',
135 ],
136 }, {
137 'sources': [
138 'aecm/aecm_core_c.c',
139 ],
140 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000141 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000142 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
143 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000144 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000145 ],
146 'conditions': [
147 ['enable_protobuf==1', {
148 'targets': [
149 {
150 'target_name': 'audioproc_debug_proto',
151 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000152 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000153 'variables': {
154 'proto_in_dir': '.',
155 # Workaround to protect against gyp's pathname relativization when
156 # this file is included by modules.gyp.
157 'proto_out_protected': 'webrtc/audio_processing',
158 'proto_out_dir': '<(proto_out_protected)',
159 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000160 'includes': ['../../build/protoc.gypi',],
161 },
162 ],
163 }],
164 ['target_arch=="ia32" or target_arch=="x64"', {
165 'targets': [
166 {
167 'target_name': 'audio_processing_sse2',
168 'type': 'static_library',
169 'sources': [
170 'aec/aec_core_sse2.c',
171 'aec/aec_rdft_sse2.c',
172 ],
173 'cflags': ['-msse2',],
174 'xcode_settings': {
175 'OTHER_CFLAGS': ['-msse2',],
176 },
177 },
178 ],
179 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000180 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000181 'targets': [{
182 'target_name': 'audio_processing_neon',
183 'type': 'static_library',
184 'includes': ['../../build/arm_neon.gypi',],
185 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000186 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000187 ],
188 'sources': [
189 'aecm/aecm_core_neon.c',
190 'ns/nsx_core_neon.c',
191 ],
192 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000193 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000194 'dependencies': [
195 'audio_processing_offsets',
196 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000197 'sources': [
198 'aecm/aecm_core_neon.S',
199 'ns/nsx_core_neon.S',
200 ],
201 'sources!': [
202 'aecm/aecm_core_neon.c',
203 'ns/nsx_core_neon.c',
204 ],
205 'includes!': ['../../build/arm_neon.gypi',],
206 }],
207 ],
208 }],
209 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000210 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000211 'targets': [{
212 'target_name': 'audio_processing_offsets',
213 'type': 'none',
214 'sources': [
215 'aecm/aecm_core_neon_offsets.c',
216 'ns/nsx_core_neon_offsets.c',
217 ],
218 'variables': {
219 'asm_header_dir': 'asm_offsets',
220 },
221 'includes': ['../../build/generate_asm_header.gypi',],
222 }],
223 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000224 ],
225 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000226 ],
227}