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