Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 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 | |
| 9 | import("../../../webrtc.gni") |
| 10 | |
Sam Zackrisson | 41478c7 | 2019-10-15 10:10:26 +0200 | [diff] [blame^] | 11 | rtc_source_set("gain_control_interface") { |
| 12 | sources = [ |
| 13 | "gain_control.h", |
| 14 | ] |
| 15 | } |
| 16 | |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 17 | rtc_source_set("agc") { |
| 18 | sources = [ |
| 19 | "agc_manager_direct.cc", |
| 20 | "agc_manager_direct.h", |
| 21 | ] |
| 22 | configs += [ "..:apm_debug_dump" ] |
| 23 | deps = [ |
Sam Zackrisson | 41478c7 | 2019-10-15 10:10:26 +0200 | [diff] [blame^] | 24 | ":gain_control_interface", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 25 | ":gain_map", |
| 26 | ":level_estimation", |
| 27 | "..:apm_logging", |
Per Ã…hgren | 928146f | 2019-08-20 09:19:21 +0200 | [diff] [blame] | 28 | "../../../common_audio", |
| 29 | "../../../common_audio:common_audio_c", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 30 | "../../../rtc_base:checks", |
Alex Loiko | 9489c3a | 2018-08-09 15:04:24 +0200 | [diff] [blame] | 31 | "../../../rtc_base:gtest_prod", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 32 | "../../../rtc_base:logging", |
| 33 | "../../../rtc_base:macromagic", |
| 34 | "../../../rtc_base:safe_minmax", |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 35 | "../../../system_wrappers:metrics", |
Alex Loiko | 2ffafa8 | 2018-07-06 15:35:42 +0200 | [diff] [blame] | 36 | "../agc2:level_estimation_agc", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 37 | "../vad", |
| 38 | ] |
| 39 | } |
| 40 | |
| 41 | rtc_source_set("level_estimation") { |
| 42 | sources = [ |
| 43 | "agc.cc", |
| 44 | "agc.h", |
| 45 | "loudness_histogram.cc", |
| 46 | "loudness_histogram.h", |
| 47 | "utility.cc", |
| 48 | "utility.h", |
| 49 | ] |
| 50 | deps = [ |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 51 | "../../../rtc_base:checks", |
| 52 | "../../../rtc_base:macromagic", |
| 53 | "../vad", |
| 54 | ] |
| 55 | } |
| 56 | |
| 57 | rtc_source_set("agc_legacy_c") { |
| 58 | visibility = [ |
| 59 | ":*", |
| 60 | "..:*", |
| 61 | ] # Only targets in this file and in |
| 62 | # audio_processing can depend on |
| 63 | # this. |
| 64 | |
| 65 | sources = [ |
| 66 | "legacy/analog_agc.c", |
| 67 | "legacy/analog_agc.h", |
| 68 | "legacy/digital_agc.c", |
| 69 | "legacy/digital_agc.h", |
| 70 | "legacy/gain_control.h", |
| 71 | ] |
| 72 | |
| 73 | deps = [ |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 74 | "../../../common_audio", |
| 75 | "../../../common_audio:common_audio_c", |
Artem Titov | 333a505 | 2018-07-25 16:56:18 +0200 | [diff] [blame] | 76 | "../../../common_audio/third_party/fft4g", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 77 | "../../../rtc_base:checks", |
| 78 | "../../../rtc_base:rtc_base_approved", |
| 79 | "../../../system_wrappers:cpu_features_api", |
| 80 | ] |
| 81 | |
| 82 | if (rtc_build_with_neon) { |
| 83 | if (current_cpu != "arm64") { |
Oleh Prypin | d2f4e8b | 2018-08-01 12:18:05 +0200 | [diff] [blame] | 84 | # Enable compilation for the NEON instruction set. |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 85 | suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 86 | cflags = [ "-mfpu=neon" ] |
| 87 | } |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 88 | } |
| 89 | } |
| 90 | |
| 91 | rtc_source_set("gain_map") { |
| 92 | sources = [ |
| 93 | "gain_map_internal.h", |
| 94 | ] |
| 95 | } |
| 96 | |
| 97 | if (rtc_include_tests) { |
| 98 | rtc_source_set("agc_unittests") { |
| 99 | testonly = true |
| 100 | sources = [ |
| 101 | "agc_manager_direct_unittest.cc", |
| 102 | "loudness_histogram_unittest.cc", |
| 103 | "mock_agc.h", |
| 104 | ] |
| 105 | configs += [ "..:apm_debug_dump" ] |
| 106 | |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 107 | deps = [ |
| 108 | ":agc", |
Sam Zackrisson | 41478c7 | 2019-10-15 10:10:26 +0200 | [diff] [blame^] | 109 | ":gain_control_interface", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 110 | ":level_estimation", |
| 111 | "..:mocks", |
Alex Loiko | ed8ff64 | 2018-07-06 14:54:30 +0200 | [diff] [blame] | 112 | "../../../test:fileutils", |
| 113 | "../../../test:test_support", |
| 114 | "//testing/gtest", |
| 115 | ] |
| 116 | } |
| 117 | } |