blob: 920cbca91f54a3c3cd70321a8fdef55bb3aa3fff [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',
59 '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',
henrikg@webrtc.orgc6937042014-01-30 09:50:46 +000072 'typing_detection.cc',
73 'typing_detection.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000074 'utility/delay_estimator.c',
75 'utility/delay_estimator.h',
76 'utility/delay_estimator_internal.h',
77 'utility/delay_estimator_wrapper.c',
78 'utility/delay_estimator_wrapper.h',
79 'utility/fft4g.c',
80 'utility/fft4g.h',
81 'utility/ring_buffer.c',
82 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000083 'voice_detection_impl.cc',
84 'voice_detection_impl.h',
85 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000086 'conditions': [
87 ['aec_debug_dump==1', {
88 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
89 }],
andrew@webrtc.org1760a172013-09-25 23:17:38 +000090 ['aec_untrusted_delay_for_testing==1', {
91 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
92 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000093 ['enable_protobuf==1', {
94 'dependencies': ['audioproc_debug_proto'],
95 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
96 }],
97 ['prefer_fixed_point==1', {
98 'defines': ['WEBRTC_NS_FIXED'],
99 'sources': [
100 'ns/include/noise_suppression_x.h',
101 'ns/noise_suppression_x.c',
102 'ns/nsx_core.c',
103 'ns/nsx_core.h',
104 'ns/nsx_defines.h',
105 ],
andrew@webrtc.orgea9392d2014-01-16 07:22:01 +0000106 'conditions': [
107 ['target_arch=="mipsel"', {
108 'sources': [
109 'ns/nsx_core_mips.c',
110 ],
111 }, {
112 'sources': [
113 'ns/nsx_core_c.c',
114 ],
115 }],
116 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000117 }, {
118 'defines': ['WEBRTC_NS_FLOAT'],
119 'sources': [
120 'ns/defines.h',
121 'ns/include/noise_suppression.h',
122 'ns/noise_suppression.c',
123 'ns/ns_core.c',
124 'ns/ns_core.h',
125 'ns/windows_private.h',
126 ],
127 }],
128 ['target_arch=="ia32" or target_arch=="x64"', {
129 'dependencies': ['audio_processing_sse2',],
130 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000131 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000132 'dependencies': ['audio_processing_neon',],
133 }],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000134 ['target_arch=="mipsel"', {
135 'sources': [
136 'aecm/aecm_core_mips.c',
137 ],
andrew@webrtc.orgc0907ef2014-02-21 00:13:31 +0000138 'conditions': [
139 ['mips_fpu==1', {
140 'sources': [
141 'aec/aec_core_mips.c',
142 'aec/aec_rdft_mips.c',
143 ],
144 }],
145 ],
andrew@webrtc.orge03cafa2013-11-11 20:10:01 +0000146 }, {
147 'sources': [
148 'aecm/aecm_core_c.c',
149 ],
150 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000151 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000152 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
153 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000154 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000155 ],
156 'conditions': [
157 ['enable_protobuf==1', {
158 'targets': [
159 {
160 'target_name': 'audioproc_debug_proto',
161 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000162 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000163 'variables': {
164 'proto_in_dir': '.',
165 # Workaround to protect against gyp's pathname relativization when
166 # this file is included by modules.gyp.
167 'proto_out_protected': 'webrtc/audio_processing',
168 'proto_out_dir': '<(proto_out_protected)',
169 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000170 'includes': ['../../build/protoc.gypi',],
171 },
172 ],
173 }],
174 ['target_arch=="ia32" or target_arch=="x64"', {
175 'targets': [
176 {
177 'target_name': 'audio_processing_sse2',
178 'type': 'static_library',
179 'sources': [
180 'aec/aec_core_sse2.c',
181 'aec/aec_rdft_sse2.c',
182 ],
183 'cflags': ['-msse2',],
184 'xcode_settings': {
185 'OTHER_CFLAGS': ['-msse2',],
186 },
187 },
188 ],
189 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000190 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000191 'targets': [{
192 'target_name': 'audio_processing_neon',
193 'type': 'static_library',
194 'includes': ['../../build/arm_neon.gypi',],
195 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000196 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000197 ],
198 'sources': [
199 'aecm/aecm_core_neon.c',
200 'ns/nsx_core_neon.c',
201 ],
202 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000203 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000204 'dependencies': [
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000205 '<(gen_core_neon_offsets_gyp):*',
kma@webrtc.org12454022012-11-07 22:34:31 +0000206 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000207 'sources': [
208 'aecm/aecm_core_neon.S',
209 'ns/nsx_core_neon.S',
210 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000211 'include_dirs': [
212 '<(shared_generated_dir)',
213 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000214 'sources!': [
215 'aecm/aecm_core_neon.c',
216 'ns/nsx_core_neon.c',
217 ],
218 'includes!': ['../../build/arm_neon.gypi',],
219 }],
220 ],
221 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000222 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000223 ],
224}