You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.6 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. import("../../../webrtc.gni")
  9. rtc_source_set("gain_control_interface") {
  10. sources = [
  11. "gain_control.h",
  12. ]
  13. }
  14. rtc_library("agc") {
  15. sources = [
  16. "agc_manager_direct.cc",
  17. "agc_manager_direct.h",
  18. ]
  19. configs += [ "..:apm_debug_dump" ]
  20. deps = [
  21. ":gain_control_interface",
  22. ":gain_map",
  23. ":level_estimation",
  24. "..:apm_logging",
  25. "../../../common_audio",
  26. "../../../common_audio:common_audio_c",
  27. "../../../rtc_base:checks",
  28. "../../../rtc_base:gtest_prod",
  29. "../../../rtc_base:logging",
  30. "../../../rtc_base:macromagic",
  31. "../../../rtc_base:safe_minmax",
  32. "../../../system_wrappers:metrics",
  33. "../agc2:level_estimation_agc",
  34. "../vad",
  35. ]
  36. }
  37. rtc_library("level_estimation") {
  38. sources = [
  39. "agc.cc",
  40. "agc.h",
  41. "loudness_histogram.cc",
  42. "loudness_histogram.h",
  43. "utility.cc",
  44. "utility.h",
  45. ]
  46. deps = [
  47. "../../../rtc_base:checks",
  48. "../../../rtc_base:macromagic",
  49. "../vad",
  50. ]
  51. }
  52. rtc_library("agc_legacy_c") {
  53. visibility = [
  54. ":*",
  55. "..:*",
  56. ] # Only targets in this file and in
  57. # audio_processing can depend on
  58. # this.
  59. sources = [
  60. "legacy/analog_agc.c",
  61. "legacy/analog_agc.h",
  62. "legacy/digital_agc.c",
  63. "legacy/digital_agc.h",
  64. "legacy/gain_control.h",
  65. ]
  66. deps = [
  67. "../../../common_audio",
  68. "../../../common_audio:common_audio_c",
  69. "../../../common_audio/third_party/fft4g",
  70. "../../../rtc_base:checks",
  71. "../../../rtc_base:rtc_base_approved",
  72. "../../../system_wrappers:cpu_features_api",
  73. ]
  74. if (rtc_build_with_neon) {
  75. if (current_cpu != "arm64") {
  76. # Enable compilation for the NEON instruction set.
  77. suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
  78. cflags = [ "-mfpu=neon" ]
  79. }
  80. }
  81. }
  82. rtc_source_set("gain_map") {
  83. sources = [
  84. "gain_map_internal.h",
  85. ]
  86. }
  87. if (rtc_include_tests) {
  88. rtc_library("agc_unittests") {
  89. testonly = true
  90. sources = [
  91. "agc_manager_direct_unittest.cc",
  92. "loudness_histogram_unittest.cc",
  93. "mock_agc.h",
  94. ]
  95. configs += [ "..:apm_debug_dump" ]
  96. deps = [
  97. ":agc",
  98. ":gain_control_interface",
  99. ":level_estimation",
  100. "..:mocks",
  101. "../../../test:fileutils",
  102. "../../../test:test_support",
  103. "//testing/gtest",
  104. ]
  105. }
  106. }