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