1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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.
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',
15 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
19 'target_name': 'audio_processing',
20 'type': 'static_library',
22 # Outputs some low-level debug files.
26 # Disables the usual mode where we trust the reported system delay
27 # values the AEC receives. The corresponding define is set appropriately
28 # in the code, but it can be force-enabled here for testing.
29 'aec_untrusted_delay_for_testing%': 0,
32 '<@(audio_processing_dependencies)',
35 'aec/include/echo_cancellation.h',
36 'aec/echo_cancellation.c',
37 'aec/echo_cancellation_internal.h',
40 'aec/aec_core_internal.h',
43 'aec/aec_resampler.h',
44 'aec/aec_resampler.c',
45 'aecm/include/echo_control_mobile.h',
46 'aecm/echo_control_mobile.c',
49 'agc/include/gain_control.h',
56 'audio_processing_impl.cc',
57 'audio_processing_impl.h',
59 'echo_cancellation_impl.cc',
60 'echo_cancellation_impl.h',
61 'echo_control_mobile_impl.cc',
62 'echo_control_mobile_impl.h',
63 'gain_control_impl.cc',
64 'gain_control_impl.h',
65 'high_pass_filter_impl.cc',
66 'high_pass_filter_impl.h',
67 'include/audio_processing.h',
68 'level_estimator_impl.cc',
69 'level_estimator_impl.h',
70 'noise_suppression_impl.cc',
71 'noise_suppression_impl.h',
72 'processing_component.cc',
73 'processing_component.h',
76 'typing_detection.cc',
78 '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',
85 'utility/ring_buffer.c',
86 'utility/ring_buffer.h',
87 'voice_detection_impl.cc',
88 'voice_detection_impl.h',
91 ['aec_debug_dump==1', {
92 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
94 ['aec_untrusted_delay_for_testing==1', {
95 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
97 ['agc_debug_dump==1', {
98 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
100 ['enable_protobuf==1', {
101 'dependencies': ['audioproc_debug_proto'],
102 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
104 ['prefer_fixed_point==1', {
105 'defines': ['WEBRTC_NS_FIXED'],
107 'ns/include/noise_suppression_x.h',
108 'ns/noise_suppression_x.c',
114 ['target_arch=="mipsel"', {
116 'ns/nsx_core_mips.c',
125 'defines': ['WEBRTC_NS_FLOAT'],
128 'ns/include/noise_suppression.h',
129 'ns/noise_suppression.c',
132 'ns/windows_private.h',
135 ['target_arch=="ia32" or target_arch=="x64"', {
136 'dependencies': ['audio_processing_sse2',],
138 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
139 'dependencies': ['audio_processing_neon',],
141 ['target_arch=="mipsel"', {
143 'aecm/aecm_core_mips.c',
148 'aec/aec_core_mips.c',
149 'aec/aec_rdft_mips.c',
155 'aecm/aecm_core_c.c',
159 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
160 'msvs_disabled_warnings': [ 4267, ],
164 ['enable_protobuf==1', {
167 'target_name': 'audioproc_debug_proto',
168 'type': 'static_library',
169 'sources': ['debug.proto',],
172 # Workaround to protect against gyp's pathname relativization when
173 # this file is included by modules.gyp.
174 'proto_out_protected': 'webrtc/audio_processing',
175 'proto_out_dir': '<(proto_out_protected)',
177 'includes': ['../../build/protoc.gypi',],
181 ['target_arch=="ia32" or target_arch=="x64"', {
184 'target_name': 'audio_processing_sse2',
185 'type': 'static_library',
187 'aec/aec_core_sse2.c',
188 'aec/aec_rdft_sse2.c',
190 'cflags': ['-msse2',],
192 'OTHER_CFLAGS': ['-msse2',],
197 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
199 'target_name': 'audio_processing_neon',
200 'type': 'static_library',
201 'includes': ['../../build/arm_neon.gypi',],
203 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
206 'aec/aec_core_neon.c',
207 'aec/aec_rdft_neon.c',
208 'aecm/aecm_core_neon.c',
209 'ns/nsx_core_neon.c',
212 ['OS=="android" or OS=="ios"', {
214 '<(gen_core_neon_offsets_gyp):*',
217 'aecm/aecm_core_neon.S',
218 'ns/nsx_core_neon.S',
221 '<(shared_generated_dir)',
224 'aecm/aecm_core_neon.c',
225 'ns/nsx_core_neon.c',
227 'includes!': ['../../build/arm_neon.gypi',],
229 # Disable LTO in audio_processing_neon target due to compiler bug