1# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. 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 9import("../../../webrtc.gni") 10 11rtc_library("aec3") { 12 visibility = [ "*" ] 13 configs += [ "..:apm_debug_dump" ] 14 sources = [ 15 "adaptive_fir_filter.cc", 16 "adaptive_fir_filter.h", 17 "adaptive_fir_filter_erl.cc", 18 "adaptive_fir_filter_erl.h", 19 "aec3_common.cc", 20 "aec3_common.h", 21 "aec3_fft.cc", 22 "aec3_fft.h", 23 "aec_state.cc", 24 "aec_state.h", 25 "alignment_mixer.cc", 26 "alignment_mixer.h", 27 "api_call_jitter_metrics.cc", 28 "api_call_jitter_metrics.h", 29 "block_buffer.cc", 30 "block_buffer.h", 31 "block_delay_buffer.cc", 32 "block_delay_buffer.h", 33 "block_framer.cc", 34 "block_framer.h", 35 "block_processor.cc", 36 "block_processor.h", 37 "block_processor_metrics.cc", 38 "block_processor_metrics.h", 39 "clockdrift_detector.cc", 40 "clockdrift_detector.h", 41 "coarse_filter_update_gain.cc", 42 "coarse_filter_update_gain.h", 43 "comfort_noise_generator.cc", 44 "comfort_noise_generator.h", 45 "decimator.cc", 46 "decimator.h", 47 "delay_estimate.h", 48 "dominant_nearend_detector.cc", 49 "dominant_nearend_detector.h", 50 "downsampled_render_buffer.cc", 51 "downsampled_render_buffer.h", 52 "echo_audibility.cc", 53 "echo_audibility.h", 54 "echo_canceller3.cc", 55 "echo_canceller3.h", 56 "echo_path_delay_estimator.cc", 57 "echo_path_delay_estimator.h", 58 "echo_path_variability.cc", 59 "echo_path_variability.h", 60 "echo_remover.cc", 61 "echo_remover.h", 62 "echo_remover_metrics.cc", 63 "echo_remover_metrics.h", 64 "erl_estimator.cc", 65 "erl_estimator.h", 66 "erle_estimator.cc", 67 "erle_estimator.h", 68 "fft_buffer.cc", 69 "fft_buffer.h", 70 "fft_data.h", 71 "filter_analyzer.cc", 72 "filter_analyzer.h", 73 "frame_blocker.cc", 74 "frame_blocker.h", 75 "fullband_erle_estimator.cc", 76 "fullband_erle_estimator.h", 77 "matched_filter.cc", 78 "matched_filter.h", 79 "matched_filter_lag_aggregator.cc", 80 "matched_filter_lag_aggregator.h", 81 "moving_average.cc", 82 "moving_average.h", 83 "nearend_detector.h", 84 "refined_filter_update_gain.cc", 85 "refined_filter_update_gain.h", 86 "render_buffer.cc", 87 "render_buffer.h", 88 "render_delay_buffer.cc", 89 "render_delay_buffer.h", 90 "render_delay_controller.cc", 91 "render_delay_controller.h", 92 "render_delay_controller_metrics.cc", 93 "render_delay_controller_metrics.h", 94 "render_signal_analyzer.cc", 95 "render_signal_analyzer.h", 96 "residual_echo_estimator.cc", 97 "residual_echo_estimator.h", 98 "reverb_decay_estimator.cc", 99 "reverb_decay_estimator.h", 100 "reverb_frequency_response.cc", 101 "reverb_frequency_response.h", 102 "reverb_model.cc", 103 "reverb_model.h", 104 "reverb_model_estimator.cc", 105 "reverb_model_estimator.h", 106 "signal_dependent_erle_estimator.cc", 107 "signal_dependent_erle_estimator.h", 108 "spectrum_buffer.cc", 109 "spectrum_buffer.h", 110 "stationarity_estimator.cc", 111 "stationarity_estimator.h", 112 "subband_erle_estimator.cc", 113 "subband_erle_estimator.h", 114 "subband_nearend_detector.cc", 115 "subband_nearend_detector.h", 116 "subtractor.cc", 117 "subtractor.h", 118 "subtractor_output.cc", 119 "subtractor_output.h", 120 "subtractor_output_analyzer.cc", 121 "subtractor_output_analyzer.h", 122 "suppression_filter.cc", 123 "suppression_filter.h", 124 "suppression_gain.cc", 125 "suppression_gain.h", 126 "vector_math.h", 127 ] 128 129 defines = [] 130 if (rtc_build_with_neon && current_cpu != "arm64") { 131 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] 132 cflags = [ "-mfpu=neon" ] 133 } 134 135 deps = [ 136 "..:apm_logging", 137 "..:audio_buffer", 138 "..:high_pass_filter", 139 "../../../api:array_view", 140 "../../../api/audio:aec3_config", 141 "../../../api/audio:echo_control", 142 "../../../common_audio:common_audio_c", 143 "../../../common_audio/third_party/ooura:fft_size_128", 144 "../../../rtc_base:checks", 145 "../../../rtc_base:rtc_base_approved", 146 "../../../rtc_base:safe_minmax", 147 "../../../rtc_base/experiments:field_trial_parser", 148 "../../../rtc_base/system:arch", 149 "../../../system_wrappers:cpu_features_api", 150 "../../../system_wrappers:field_trial", 151 "../../../system_wrappers:metrics", 152 "../utility:cascaded_biquad_filter", 153 ] 154 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 155} 156 157if (rtc_include_tests) { 158 rtc_library("aec3_unittests") { 159 testonly = true 160 161 configs += [ "..:apm_debug_dump" ] 162 sources = [ 163 "mock/mock_block_processor.cc", 164 "mock/mock_block_processor.h", 165 "mock/mock_echo_remover.cc", 166 "mock/mock_echo_remover.h", 167 "mock/mock_render_delay_buffer.cc", 168 "mock/mock_render_delay_buffer.h", 169 "mock/mock_render_delay_controller.cc", 170 "mock/mock_render_delay_controller.h", 171 ] 172 173 deps = [ 174 ":aec3", 175 "..:apm_logging", 176 "..:audio_buffer", 177 "..:audio_processing", 178 "..:audio_processing_unittests", 179 "..:high_pass_filter", 180 "../../../api:array_view", 181 "../../../api/audio:aec3_config", 182 "../../../rtc_base:checks", 183 "../../../rtc_base:rtc_base_approved", 184 "../../../rtc_base:safe_minmax", 185 "../../../rtc_base/system:arch", 186 "../../../system_wrappers:cpu_features_api", 187 "../../../test:field_trial", 188 "../../../test:test_support", 189 "../utility:cascaded_biquad_filter", 190 ] 191 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 192 193 defines = [] 194 195 if (rtc_enable_protobuf) { 196 sources += [ 197 "adaptive_fir_filter_erl_unittest.cc", 198 "adaptive_fir_filter_unittest.cc", 199 "aec3_fft_unittest.cc", 200 "aec_state_unittest.cc", 201 "alignment_mixer_unittest.cc", 202 "api_call_jitter_metrics_unittest.cc", 203 "block_delay_buffer_unittest.cc", 204 "block_framer_unittest.cc", 205 "block_processor_metrics_unittest.cc", 206 "block_processor_unittest.cc", 207 "clockdrift_detector_unittest.cc", 208 "coarse_filter_update_gain_unittest.cc", 209 "comfort_noise_generator_unittest.cc", 210 "decimator_unittest.cc", 211 "echo_canceller3_unittest.cc", 212 "echo_path_delay_estimator_unittest.cc", 213 "echo_path_variability_unittest.cc", 214 "echo_remover_metrics_unittest.cc", 215 "echo_remover_unittest.cc", 216 "erl_estimator_unittest.cc", 217 "erle_estimator_unittest.cc", 218 "fft_data_unittest.cc", 219 "filter_analyzer_unittest.cc", 220 "frame_blocker_unittest.cc", 221 "matched_filter_lag_aggregator_unittest.cc", 222 "matched_filter_unittest.cc", 223 "moving_average_unittest.cc", 224 "refined_filter_update_gain_unittest.cc", 225 "render_buffer_unittest.cc", 226 "render_delay_buffer_unittest.cc", 227 "render_delay_controller_metrics_unittest.cc", 228 "render_delay_controller_unittest.cc", 229 "render_signal_analyzer_unittest.cc", 230 "residual_echo_estimator_unittest.cc", 231 "reverb_model_estimator_unittest.cc", 232 "signal_dependent_erle_estimator_unittest.cc", 233 "subtractor_unittest.cc", 234 "suppression_filter_unittest.cc", 235 "suppression_gain_unittest.cc", 236 "vector_math_unittest.cc", 237 ] 238 } 239 } 240} 241