blob: 5ca1cc20e9cc3df234e5047f0831788e2b55c91d [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{
niklase@google.com470e71d2011-07-07 08:21:25 +000010 'targets': [
11 {
12 'target_name': 'audio_processing',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000013 'type': 'static_library',
14 'variables': {
15 # Outputs some low-level debug files.
16 'aec_debug_dump%': 0,
17 },
niklase@google.com470e71d2011-07-07 08:21:25 +000018 'dependencies': [
kjellander@webrtc.org0403ef42011-11-17 08:35:47 +000019 '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
xians@google.comd3185fe2011-09-12 12:24:39 +000020 '<(webrtc_root)/common_audio/common_audio.gyp:vad',
21 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
niklase@google.com470e71d2011-07-07 08:21:25 +000022 ],
23 'include_dirs': [
24 '../interface',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000025 'aec/include',
26 'aecm/include',
27 'agc/include',
28 'include',
29 'ns/include',
30 'utility',
niklase@google.com470e71d2011-07-07 08:21:25 +000031 ],
32 'direct_dependent_settings': {
33 'include_dirs': [
34 '../interface',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000035 'include',
niklase@google.com470e71d2011-07-07 08:21:25 +000036 ],
37 },
38 'sources': [
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000039 'aec/include/echo_cancellation.h',
40 'aec/echo_cancellation.c',
41 'aec/echo_cancellation_internal.h',
42 'aec/aec_core.h',
43 'aec/aec_core.c',
44 'aec/aec_rdft.h',
45 'aec/aec_rdft.c',
46 'aec/aec_resampler.h',
47 'aec/aec_resampler.c',
48 'aecm/include/echo_control_mobile.h',
49 'aecm/echo_control_mobile.c',
50 'aecm/aecm_core.c',
51 'aecm/aecm_core.h',
52 'agc/include/gain_control.h',
53 'agc/analog_agc.c',
54 'agc/analog_agc.h',
55 'agc/digital_agc.c',
56 'agc/digital_agc.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000057 'audio_buffer.cc',
58 'audio_buffer.h',
59 'audio_processing_impl.cc',
60 'audio_processing_impl.h',
61 'echo_cancellation_impl.cc',
62 'echo_cancellation_impl.h',
63 'echo_control_mobile_impl.cc',
64 'echo_control_mobile_impl.h',
65 'gain_control_impl.cc',
66 'gain_control_impl.h',
67 'high_pass_filter_impl.cc',
68 'high_pass_filter_impl.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000069 'include/audio_processing.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000070 'level_estimator_impl.cc',
71 'level_estimator_impl.h',
72 'noise_suppression_impl.cc',
73 'noise_suppression_impl.h',
74 'splitting_filter.cc',
75 'splitting_filter.h',
76 'processing_component.cc',
77 'processing_component.h',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000078 'utility/delay_estimator.c',
79 'utility/delay_estimator.h',
80 'utility/delay_estimator_internal.h',
81 'utility/delay_estimator_wrapper.c',
82 'utility/delay_estimator_wrapper.h',
83 'utility/fft4g.c',
84 'utility/fft4g.h',
85 'utility/ring_buffer.c',
86 'utility/ring_buffer.h',
niklase@google.com470e71d2011-07-07 08:21:25 +000087 'voice_detection_impl.cc',
88 'voice_detection_impl.h',
89 ],
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +000090 'conditions': [
91 ['aec_debug_dump==1', {
92 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
93 }],
94 ['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 ],
107 }, {
108 'defines': ['WEBRTC_NS_FLOAT'],
109 'sources': [
110 'ns/defines.h',
111 'ns/include/noise_suppression.h',
112 'ns/noise_suppression.c',
113 'ns/ns_core.c',
114 'ns/ns_core.h',
115 'ns/windows_private.h',
116 ],
117 }],
118 ['target_arch=="ia32" or target_arch=="x64"', {
119 'dependencies': ['audio_processing_sse2',],
120 }],
121 ['target_arch=="arm" and armv7==1', {
122 'dependencies': ['audio_processing_neon',],
123 }],
124 ],
andrew@webrtc.org63e09642013-01-29 06:45:22 +0000125 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
126 'msvs_disabled_warnings': [ 4267, ],
niklase@google.com470e71d2011-07-07 08:21:25 +0000127 },
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000128 ],
129 'conditions': [
130 ['enable_protobuf==1', {
131 'targets': [
132 {
133 'target_name': 'audioproc_debug_proto',
134 'type': 'static_library',
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000135 'sources': ['debug.proto',],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000136 'variables': {
137 'proto_in_dir': '.',
138 # Workaround to protect against gyp's pathname relativization when
139 # this file is included by modules.gyp.
140 'proto_out_protected': 'webrtc/audio_processing',
141 'proto_out_dir': '<(proto_out_protected)',
142 },
andrew@webrtc.org8c4696c2012-09-08 19:27:24 +0000143 'includes': ['../../build/protoc.gypi',],
144 },
145 ],
146 }],
147 ['target_arch=="ia32" or target_arch=="x64"', {
148 'targets': [
149 {
150 'target_name': 'audio_processing_sse2',
151 'type': 'static_library',
152 'sources': [
153 'aec/aec_core_sse2.c',
154 'aec/aec_rdft_sse2.c',
155 ],
156 'cflags': ['-msse2',],
157 'xcode_settings': {
158 'OTHER_CFLAGS': ['-msse2',],
159 },
160 },
161 ],
162 }],
163 ['target_arch=="arm" and armv7==1', {
kma@webrtc.org12454022012-11-07 22:34:31 +0000164 'targets': [{
165 'target_name': 'audio_processing_neon',
166 'type': 'static_library',
167 'includes': ['../../build/arm_neon.gypi',],
168 'dependencies': [
169 '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
170 ],
171 'sources': [
172 'aecm/aecm_core_neon.c',
173 'ns/nsx_core_neon.c',
174 ],
175 'conditions': [
176 ['OS=="android"', {
177 'dependencies': [
178 'audio_processing_offsets',
179 ],
180 # TODO(kma): port this block from Android into other build systems.
181 'sources': [
182 'aecm/aecm_core_neon.S',
183 'ns/nsx_core_neon.S',
184 ],
185 'sources!': [
186 'aecm/aecm_core_neon.c',
187 'ns/nsx_core_neon.c',
188 ],
189 'includes!': ['../../build/arm_neon.gypi',],
190 }],
191 ],
192 }],
193 'conditions': [
194 ['OS=="android"', {
195 'targets': [{
196 'target_name': 'audio_processing_offsets',
197 'type': 'none',
198 'sources': [
199 'aecm/aecm_core_neon_offsets.c',
200 'ns/nsx_core_neon_offsets.c',
201 ],
202 'variables': {
203 'asm_header_dir': 'asm_offsets',
204 },
205 'includes': ['../../build/generate_asm_header.gypi',],
206 }],
207 }],
andrew@webrtc.org7bf26462011-12-03 00:03:31 +0000208 ],
209 }],
niklase@google.com470e71d2011-07-07 08:21:25 +0000210 ],
211}