blob: da6121749ab80cf40fe7443c6f122bcd77e2502a [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',
57 'echo_cancellation_impl.cc',
58 'echo_cancellation_impl.h',
andrew@webrtc.org61e596f2013-07-25 18:28:29 +000059 'echo_cancellation_impl_wrapper.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000060 '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',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +000073 'typing_detection.cc',
74 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000075 'utility/delay_estimator.c',
76 'utility/delay_estimator.h',
77 'utility/delay_estimator_internal.h',
78 'utility/delay_estimator_wrapper.c',
79 'utility/delay_estimator_wrapper.h',
80 'utility/fft4g.c',
81 'utility/fft4g.h',
82 'utility/ring_buffer.c',
83 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000084 'voice_detection_impl.cc',
85 'voice_detection_impl.h',
86 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000087 'conditions': [
88 ['aec_debug_dump==1', {
89 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
90 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +000091 ['aec_untrusted_delay_for_testing==1', {
92 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
93 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000094 ['enable_protobuf==1', {
95 'dependencies': ['audioproc_debug_proto'],
96 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
97 }],
98 ['prefer_fixed_point==1', {
99 'defines': ['WEBRTC_NS_FIXED'],
100 'sources': [
101 'ns/include/noise_suppression_x.h',
102 'ns/noise_suppression_x.c',
103 'ns/nsx_core.c',
104 'ns/nsx_core.h',
105 'ns/nsx_defines.h',
106 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000107 'conditions': [
108 ['target_arch=="mipsel"', {
109 'sources': [
110 'ns/nsx_core_mips.c',
111 ],
112 }, {
113 'sources': [
114 'ns/nsx_core_c.c',
115 ],
116 }],
117 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000118 }, {
119 'defines': ['WEBRTC_NS_FLOAT'],
120 'sources': [
121 'ns/defines.h',
122 'ns/include/noise_suppression.h',
123 'ns/noise_suppression.c',
124 'ns/ns_core.c',
125 'ns/ns_core.h',
126 'ns/windows_private.h',
127 ],
128 }],
129 ['target_arch=="ia32" or target_arch=="x64"', {
130 'dependencies': ['audio_processing_sse2',],
131 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000132 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000133 'dependencies': ['audio_processing_neon',],
134 }],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000135 ['target_arch=="mipsel"', {
136 'sources': [
137 'aecm/aecm_core_mips.c',
138 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000139 'conditions': [
140 ['mips_fpu==1', {
141 'sources': [
142 'aec/aec_core_mips.c',
143 'aec/aec_rdft_mips.c',
144 ],
145 }],
146 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000147 }, {
148 'sources': [
149 'aecm/aecm_core_c.c',
150 ],
151 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000152 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000153 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
154 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000155 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000156 ],
157 'conditions': [
158 ['enable_protobuf==1', {
159 'targets': [
160 {
161 'target_name': 'audioproc_debug_proto',
162 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000163 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000164 'variables': {
165 'proto_in_dir': '.',
166 # Workaround to protect against gyp's pathname relativization when
167 # this file is included by modules.gyp.
168 'proto_out_protected': 'webrtc/audio_processing',
169 'proto_out_dir': '<(proto_out_protected)',
170 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000171 'includes': ['../../build/protoc.gypi',],
172 },
173 ],
174 }],
175 ['target_arch=="ia32" or target_arch=="x64"', {
176 'targets': [
177 {
178 'target_name': 'audio_processing_sse2',
179 'type': 'static_library',
180 'sources': [
181 'aec/aec_core_sse2.c',
182 'aec/aec_rdft_sse2.c',
183 ],
184 'cflags': ['-msse2',],
185 'xcode_settings': {
186 'OTHER_CFLAGS': ['-msse2',],
187 },
188 },
189 ],
190 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000191 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000192 'targets': [{
193 'target_name': 'audio_processing_neon',
194 'type': 'static_library',
195 'includes': ['../../build/arm_neon.gypi',],
196 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000197 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000198 ],
199 'sources': [
200 'aecm/aecm_core_neon.c',
201 'ns/nsx_core_neon.c',
202 ],
203 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000204 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000205 'dependencies': [
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000206 '<(gen_core_neon_offsets_gyp):*',
kma@webrtc.org12454022012-11-07 22:34:31 +0000207 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000208 'sources': [
209 'aecm/aecm_core_neon.S',
210 'ns/nsx_core_neon.S',
211 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000212 'include_dirs': [
213 '<(shared_generated_dir)',
214 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000215 'sources!': [
216 'aecm/aecm_core_neon.c',
217 'ns/nsx_core_neon.c',
218 ],
219 'includes!': ['../../build/arm_neon.gypi',],
220 }],
221 ],
222 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000223 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000224 ],
225}