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)/base/base.gyp:rtc_base_approved',
13 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
14 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
16 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets',
20 'target_name': 'audio_processing',
21 'type': 'static_library',
23 # Outputs some low-level debug files.
27 # Disables the usual mode where we trust the reported system delay
28 # values the AEC receives. The corresponding define is set appropriately
29 # in the code, but it can be force-enabled here for testing.
30 'aec_untrusted_delay_for_testing%': 0,
33 '<@(audio_processing_dependencies)',
36 'aec/include/echo_cancellation.h',
37 'aec/echo_cancellation.c',
38 'aec/echo_cancellation_internal.h',
41 'aec/aec_core_internal.h',
44 'aec/aec_resampler.h',
45 'aec/aec_resampler.c',
46 'aecm/include/echo_control_mobile.h',
47 'aecm/echo_control_mobile.c',
50 'agc/include/gain_control.h',
57 'audio_processing_impl.cc',
58 'audio_processing_impl.h',
60 'echo_cancellation_impl.cc',
61 'echo_cancellation_impl.h',
62 'echo_control_mobile_impl.cc',
63 'echo_control_mobile_impl.h',
64 'gain_control_impl.cc',
65 'gain_control_impl.h',
66 'high_pass_filter_impl.cc',
67 'high_pass_filter_impl.h',
68 'include/audio_processing.h',
69 'level_estimator_impl.cc',
70 'level_estimator_impl.h',
71 'noise_suppression_impl.cc',
72 'noise_suppression_impl.h',
73 'processing_component.cc',
74 'processing_component.h',
77 'typing_detection.cc',
79 'utility/delay_estimator.c',
80 'utility/delay_estimator.h',
81 'utility/delay_estimator_internal.h',
82 'utility/delay_estimator_wrapper.c',
83 'utility/delay_estimator_wrapper.h',
86 'utility/ring_buffer.c',
87 'utility/ring_buffer.h',
88 'voice_detection_impl.cc',
89 'voice_detection_impl.h',
92 ['aec_debug_dump==1', {
93 'defines': ['WEBRTC_AEC_DEBUG_DUMP',],
95 ['aec_untrusted_delay_for_testing==1', {
96 'defines': ['WEBRTC_UNTRUSTED_DELAY',],
98 ['agc_debug_dump==1', {
99 'defines': ['WEBRTC_AGC_DEBUG_DUMP',],
101 ['enable_protobuf==1', {
102 'dependencies': ['audioproc_debug_proto'],
103 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'],
105 ['prefer_fixed_point==1', {
106 'defines': ['WEBRTC_NS_FIXED'],
108 'ns/include/noise_suppression_x.h',
109 'ns/noise_suppression_x.c',
115 ['target_arch=="mipsel"', {
117 'ns/nsx_core_mips.c',
126 'defines': ['WEBRTC_NS_FLOAT'],
129 'ns/include/noise_suppression.h',
130 'ns/noise_suppression.c',
133 'ns/windows_private.h',
136 ['target_arch=="ia32" or target_arch=="x64"', {
137 'dependencies': ['audio_processing_sse2',],
139 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
140 'dependencies': ['audio_processing_neon',],
142 ['target_arch=="mipsel"', {
144 'aecm/aecm_core_mips.c',
149 'aec/aec_core_mips.c',
150 'aec/aec_rdft_mips.c',
156 'aecm/aecm_core_c.c',
160 # TODO(jschuh): Bug 1348: fix size_t to int truncations.
161 'msvs_disabled_warnings': [ 4267, ],
165 ['enable_protobuf==1', {
168 'target_name': 'audioproc_debug_proto',
169 'type': 'static_library',
170 'sources': ['debug.proto',],
173 # Workaround to protect against gyp's pathname relativization when
174 # this file is included by modules.gyp.
175 'proto_out_protected': 'webrtc/audio_processing',
176 'proto_out_dir': '<(proto_out_protected)',
178 'includes': ['../../build/protoc.gypi',],
182 ['target_arch=="ia32" or target_arch=="x64"', {
185 'target_name': 'audio_processing_sse2',
186 'type': 'static_library',
188 'aec/aec_core_sse2.c',
189 'aec/aec_rdft_sse2.c',
191 'cflags': ['-msse2',],
193 'OTHER_CFLAGS': ['-msse2',],
198 ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7"', {
200 'target_name': 'audio_processing_neon',
201 'type': 'static_library',
202 'includes': ['../../build/arm_neon.gypi',],
204 '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
207 'aec/aec_core_neon.c',
208 'aec/aec_rdft_neon.c',
209 'aecm/aecm_core_neon.c',
210 'ns/nsx_core_neon.c',
213 ['OS=="android" or OS=="ios"', {
215 '<(gen_core_neon_offsets_gyp):*',
218 'aecm/aecm_core_neon.S',
219 'ns/nsx_core_neon.S',
222 '<(shared_generated_dir)',
225 'aecm/aecm_core_neon.c',
226 'ns/nsx_core_neon.c',
228 'includes!': ['../../build/arm_neon.gypi',],
230 # Disable LTO in audio_processing_neon target due to compiler bug