blob: dd5a586cf846f28dc650b5b2b9cf4ee24f460520 [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 ],
139 }, {
140 'sources': [
141 'aecm/aecm_core_c.c',
142 ],
143 }],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000144 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000145 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
146 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000147 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000148 ],
149 'conditions': [
150 ['enable_protobuf==1', {
151 'targets': [
152 {
153 'target_name': 'audioproc_debug_proto',
154 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000155 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000156 'variables': {
157 'proto_in_dir': '.',
158 # Workaround to protect against gyp's pathname relativization when
159 # this file is included by modules.gyp.
160 'proto_out_protected': 'webrtc/audio_processing',
161 'proto_out_dir': '<(proto_out_protected)',
162 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000163 'includes': ['../../build/protoc.gypi',],
164 },
165 ],
166 }],
167 ['target_arch=="ia32" or target_arch=="x64"', {
168 'targets': [
169 {
170 'target_name': 'audio_processing_sse2',
171 'type': 'static_library',
172 'sources': [
173 'aec/aec_core_sse2.c',
174 'aec/aec_rdft_sse2.c',
175 ],
176 'cflags': ['-msse2',],
177 'xcode_settings': {
178 'OTHER_CFLAGS': ['-msse2',],
179 },
180 },
181 ],
182 }],
kjellander@webrtc.org917306d2013-12-10 09:26:07 +0000183 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000184 'targets': [{
185 'target_name': 'audio_processing_neon',
186 'type': 'static_library',
187 'includes': ['../../build/arm_neon.gypi',],
188 'dependencies': [
andrew@webrtc.org34235372013-04-30 23:43:26 +0000189 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
kma@webrtc.org12454022012-11-07 22:34:31 +0000190 ],
191 'sources': [
192 'aecm/aecm_core_neon.c',
193 'ns/nsx_core_neon.c',
194 ],
195 'conditions': [
kma@webrtc.org2f9bd242013-02-23 04:16:59 +0000196 ['OS=="android" or OS=="ios"', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000197 'dependencies': [
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000198 '<(gen_core_neon_offsets_gyp):*',
kma@webrtc.org12454022012-11-07 22:34:31 +0000199 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000200 'sources': [
201 'aecm/aecm_core_neon.S',
202 'ns/nsx_core_neon.S',
203 ],
michaelbai@google.com82ebb462014-02-11 04:48:27 +0000204 'include_dirs': [
205 '<(shared_generated_dir)',
206 ],
kma@webrtc.org12454022012-11-07 22:34:31 +0000207 'sources!': [
208 'aecm/aecm_core_neon.c',
209 'ns/nsx_core_neon.c',
210 ],
211 'includes!': ['../../build/arm_neon.gypi',],
212 }],
213 ],
214 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000215 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000216 ],
217}