andrew@webrtc.org | b9d7d93 | 2012-01-25 19:21:13 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 2 | # |
| 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.org | b073010 | 2013-11-11 17:20:27 +0000 | [diff] [blame] | 10 | 'variables': { |
| 11 | 'audio_processing_dependencies': [ |
xians@webrtc.org | e46bc77 | 2014-10-10 08:36:56 +0000 | [diff] [blame] | 12 | '<(webrtc_root)/base/base.gyp:rtc_base_approved', |
andrew@webrtc.org | b073010 | 2013-11-11 17:20:27 +0000 | [diff] [blame] | 13 | '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', |
| 14 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
| 15 | ], |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 16 | 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/audio_processing/asm_offsets', |
andrew@webrtc.org | b073010 | 2013-11-11 17:20:27 +0000 | [diff] [blame] | 17 | }, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | 'targets': [ |
| 19 | { |
| 20 | 'target_name': 'audio_processing', |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 21 | 'type': 'static_library', |
| 22 | 'variables': { |
| 23 | # Outputs some low-level debug files. |
| 24 | 'aec_debug_dump%': 0, |
bjornv@webrtc.org | ea29787 | 2014-09-23 11:21:39 +0000 | [diff] [blame] | 25 | 'agc_debug_dump%': 0, |
andrew@webrtc.org | 1760a17 | 2013-09-25 23:17:38 +0000 | [diff] [blame] | 26 | |
| 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, |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 31 | }, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 32 | 'dependencies': [ |
andrew@webrtc.org | b073010 | 2013-11-11 17:20:27 +0000 | [diff] [blame] | 33 | '<@(audio_processing_dependencies)', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 34 | ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 35 | 'sources': [ |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 36 | 'aec/include/echo_cancellation.h', |
| 37 | 'aec/echo_cancellation.c', |
| 38 | 'aec/echo_cancellation_internal.h', |
| 39 | 'aec/aec_core.h', |
| 40 | 'aec/aec_core.c', |
bjornv@webrtc.org | 56a9ec3 | 2013-02-20 22:38:47 +0000 | [diff] [blame] | 41 | 'aec/aec_core_internal.h', |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 42 | 'aec/aec_rdft.h', |
| 43 | 'aec/aec_rdft.c', |
| 44 | 'aec/aec_resampler.h', |
| 45 | 'aec/aec_resampler.c', |
| 46 | 'aecm/include/echo_control_mobile.h', |
| 47 | 'aecm/echo_control_mobile.c', |
| 48 | 'aecm/aecm_core.c', |
| 49 | 'aecm/aecm_core.h', |
| 50 | 'agc/include/gain_control.h', |
| 51 | 'agc/analog_agc.c', |
| 52 | 'agc/analog_agc.h', |
| 53 | 'agc/digital_agc.c', |
| 54 | 'agc/digital_agc.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 55 | 'audio_buffer.cc', |
| 56 | 'audio_buffer.h', |
| 57 | 'audio_processing_impl.cc', |
| 58 | 'audio_processing_impl.h', |
aluebs@webrtc.org | 79b9eba | 2014-11-26 20:21:38 +0000 | [diff] [blame^] | 59 | 'channel_buffer.cc', |
| 60 | 'channel_buffer.h', |
andrew@webrtc.org | ddbb8a2 | 2014-04-22 21:00:04 +0000 | [diff] [blame] | 61 | 'common.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 62 | 'echo_cancellation_impl.cc', |
| 63 | 'echo_cancellation_impl.h', |
| 64 | 'echo_control_mobile_impl.cc', |
| 65 | 'echo_control_mobile_impl.h', |
| 66 | 'gain_control_impl.cc', |
| 67 | 'gain_control_impl.h', |
| 68 | 'high_pass_filter_impl.cc', |
| 69 | 'high_pass_filter_impl.h', |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 70 | 'include/audio_processing.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 71 | 'level_estimator_impl.cc', |
| 72 | 'level_estimator_impl.h', |
| 73 | 'noise_suppression_impl.cc', |
| 74 | 'noise_suppression_impl.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 75 | 'processing_component.cc', |
| 76 | 'processing_component.h', |
aluebs@webrtc.org | be05c74 | 2014-11-14 22:18:10 +0000 | [diff] [blame] | 77 | 'splitting_filter.cc', |
| 78 | 'splitting_filter.h', |
andrew@webrtc.org | 382c0c2 | 2014-05-05 18:22:21 +0000 | [diff] [blame] | 79 | 'rms_level.cc', |
| 80 | 'rms_level.h', |
henrikg@webrtc.org | c693704 | 2014-01-30 09:50:46 +0000 | [diff] [blame] | 81 | 'typing_detection.cc', |
| 82 | 'typing_detection.h', |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 83 | 'utility/delay_estimator.c', |
| 84 | 'utility/delay_estimator.h', |
| 85 | 'utility/delay_estimator_internal.h', |
| 86 | 'utility/delay_estimator_wrapper.c', |
| 87 | 'utility/delay_estimator_wrapper.h', |
| 88 | 'utility/fft4g.c', |
| 89 | 'utility/fft4g.h', |
| 90 | 'utility/ring_buffer.c', |
| 91 | 'utility/ring_buffer.h', |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 92 | 'voice_detection_impl.cc', |
| 93 | 'voice_detection_impl.h', |
| 94 | ], |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 95 | 'conditions': [ |
| 96 | ['aec_debug_dump==1', { |
| 97 | 'defines': ['WEBRTC_AEC_DEBUG_DUMP',], |
| 98 | }], |
andrew@webrtc.org | 1760a17 | 2013-09-25 23:17:38 +0000 | [diff] [blame] | 99 | ['aec_untrusted_delay_for_testing==1', { |
| 100 | 'defines': ['WEBRTC_UNTRUSTED_DELAY',], |
| 101 | }], |
bjornv@webrtc.org | ea29787 | 2014-09-23 11:21:39 +0000 | [diff] [blame] | 102 | ['agc_debug_dump==1', { |
| 103 | 'defines': ['WEBRTC_AGC_DEBUG_DUMP',], |
| 104 | }], |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 105 | ['enable_protobuf==1', { |
| 106 | 'dependencies': ['audioproc_debug_proto'], |
| 107 | 'defines': ['WEBRTC_AUDIOPROC_DEBUG_DUMP'], |
| 108 | }], |
| 109 | ['prefer_fixed_point==1', { |
| 110 | 'defines': ['WEBRTC_NS_FIXED'], |
| 111 | 'sources': [ |
| 112 | 'ns/include/noise_suppression_x.h', |
| 113 | 'ns/noise_suppression_x.c', |
| 114 | 'ns/nsx_core.c', |
| 115 | 'ns/nsx_core.h', |
| 116 | 'ns/nsx_defines.h', |
| 117 | ], |
andrew@webrtc.org | ea9392d | 2014-01-16 07:22:01 +0000 | [diff] [blame] | 118 | 'conditions': [ |
andrew@webrtc.org | 1153322 | 2014-11-21 16:28:32 +0000 | [diff] [blame] | 119 | ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', { |
andrew@webrtc.org | ea9392d | 2014-01-16 07:22:01 +0000 | [diff] [blame] | 120 | 'sources': [ |
| 121 | 'ns/nsx_core_mips.c', |
| 122 | ], |
| 123 | }, { |
| 124 | 'sources': [ |
| 125 | 'ns/nsx_core_c.c', |
| 126 | ], |
| 127 | }], |
| 128 | ], |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 129 | }, { |
| 130 | 'defines': ['WEBRTC_NS_FLOAT'], |
| 131 | 'sources': [ |
| 132 | 'ns/defines.h', |
| 133 | 'ns/include/noise_suppression.h', |
| 134 | 'ns/noise_suppression.c', |
| 135 | 'ns/ns_core.c', |
| 136 | 'ns/ns_core.h', |
| 137 | 'ns/windows_private.h', |
| 138 | ], |
| 139 | }], |
| 140 | ['target_arch=="ia32" or target_arch=="x64"', { |
| 141 | 'dependencies': ['audio_processing_sse2',], |
| 142 | }], |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 +0000 | [diff] [blame] | 143 | ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7" or target_arch=="arm64"', { |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 144 | 'dependencies': ['audio_processing_neon',], |
| 145 | }], |
andrew@webrtc.org | 1153322 | 2014-11-21 16:28:32 +0000 | [diff] [blame] | 146 | ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', { |
andrew@webrtc.org | e03cafa | 2013-11-11 20:10:01 +0000 | [diff] [blame] | 147 | 'sources': [ |
| 148 | 'aecm/aecm_core_mips.c', |
| 149 | ], |
andrew@webrtc.org | c0907ef | 2014-02-21 00:13:31 +0000 | [diff] [blame] | 150 | 'conditions': [ |
| 151 | ['mips_fpu==1', { |
| 152 | 'sources': [ |
| 153 | 'aec/aec_core_mips.c', |
| 154 | 'aec/aec_rdft_mips.c', |
| 155 | ], |
| 156 | }], |
| 157 | ], |
andrew@webrtc.org | e03cafa | 2013-11-11 20:10:01 +0000 | [diff] [blame] | 158 | }, { |
| 159 | 'sources': [ |
| 160 | 'aecm/aecm_core_c.c', |
| 161 | ], |
| 162 | }], |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 163 | ], |
andrew@webrtc.org | 63e0964 | 2013-01-29 06:45:22 +0000 | [diff] [blame] | 164 | # TODO(jschuh): Bug 1348: fix size_t to int truncations. |
| 165 | 'msvs_disabled_warnings': [ 4267, ], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 166 | }, |
andrew@webrtc.org | 7bf2646 | 2011-12-03 00:03:31 +0000 | [diff] [blame] | 167 | ], |
| 168 | 'conditions': [ |
| 169 | ['enable_protobuf==1', { |
| 170 | 'targets': [ |
| 171 | { |
| 172 | 'target_name': 'audioproc_debug_proto', |
| 173 | 'type': 'static_library', |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 174 | 'sources': ['debug.proto',], |
andrew@webrtc.org | 7bf2646 | 2011-12-03 00:03:31 +0000 | [diff] [blame] | 175 | 'variables': { |
| 176 | 'proto_in_dir': '.', |
| 177 | # Workaround to protect against gyp's pathname relativization when |
| 178 | # this file is included by modules.gyp. |
| 179 | 'proto_out_protected': 'webrtc/audio_processing', |
| 180 | 'proto_out_dir': '<(proto_out_protected)', |
| 181 | }, |
andrew@webrtc.org | 8c4696c | 2012-09-08 19:27:24 +0000 | [diff] [blame] | 182 | 'includes': ['../../build/protoc.gypi',], |
| 183 | }, |
| 184 | ], |
| 185 | }], |
| 186 | ['target_arch=="ia32" or target_arch=="x64"', { |
| 187 | 'targets': [ |
| 188 | { |
| 189 | 'target_name': 'audio_processing_sse2', |
| 190 | 'type': 'static_library', |
| 191 | 'sources': [ |
| 192 | 'aec/aec_core_sse2.c', |
| 193 | 'aec/aec_rdft_sse2.c', |
| 194 | ], |
| 195 | 'cflags': ['-msse2',], |
| 196 | 'xcode_settings': { |
| 197 | 'OTHER_CFLAGS': ['-msse2',], |
| 198 | }, |
| 199 | }, |
| 200 | ], |
| 201 | }], |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 +0000 | [diff] [blame] | 202 | ['(target_arch=="arm" and arm_version==7) or target_arch=="armv7" or target_arch=="arm64"', { |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 203 | 'targets': [{ |
| 204 | 'target_name': 'audio_processing_neon', |
| 205 | 'type': 'static_library', |
| 206 | 'includes': ['../../build/arm_neon.gypi',], |
| 207 | 'dependencies': [ |
andrew@webrtc.org | 3423537 | 2013-04-30 23:43:26 +0000 | [diff] [blame] | 208 | '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 209 | ], |
| 210 | 'sources': [ |
bjornv@webrtc.org | af6f02f | 2014-06-13 14:50:23 +0000 | [diff] [blame] | 211 | 'aec/aec_core_neon.c', |
bjornv@webrtc.org | cd9b90a | 2014-06-30 12:05:18 +0000 | [diff] [blame] | 212 | 'aec/aec_rdft_neon.c', |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 213 | 'aecm/aecm_core_neon.c', |
| 214 | 'ns/nsx_core_neon.c', |
| 215 | ], |
| 216 | 'conditions': [ |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 +0000 | [diff] [blame] | 217 | ['(OS=="android" or OS=="ios") and target_arch!="arm64"', { |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 218 | 'dependencies': [ |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 219 | '<(gen_core_neon_offsets_gyp):*', |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 220 | ], |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 221 | 'sources': [ |
| 222 | 'aecm/aecm_core_neon.S', |
| 223 | 'ns/nsx_core_neon.S', |
| 224 | ], |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 225 | 'include_dirs': [ |
| 226 | '<(shared_generated_dir)', |
| 227 | ], |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 228 | 'sources!': [ |
| 229 | 'aecm/aecm_core_neon.c', |
| 230 | 'ns/nsx_core_neon.c', |
| 231 | ], |
| 232 | 'includes!': ['../../build/arm_neon.gypi',], |
| 233 | }], |
andrew@webrtc.org | af7fdfc | 2014-08-29 17:41:13 +0000 | [diff] [blame] | 234 | # Disable LTO in audio_processing_neon target due to compiler bug |
| 235 | ['use_lto==1', { |
| 236 | 'cflags!': [ |
| 237 | '-flto', |
| 238 | '-ffat-lto-objects', |
| 239 | ], |
| 240 | }], |
kma@webrtc.org | 1245402 | 2012-11-07 22:34:31 +0000 | [diff] [blame] | 241 | ], |
| 242 | }], |
andrew@webrtc.org | 7bf2646 | 2011-12-03 00:03:31 +0000 | [diff] [blame] | 243 | }], |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 244 | ], |
| 245 | } |