1# Copyright (c) 2020 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_source_set("transient_suppressor_api") {
12  sources = [ "transient_suppressor.h" ]
13}
14
15rtc_library("transient_suppressor_impl") {
16  visibility = [
17    "..:optionally_built_submodule_creators",
18    ":transient_suppression_test",
19    ":transient_suppression_unittests",
20    ":click_annotate",
21  ]
22  sources = [
23    "common.h",
24    "daubechies_8_wavelet_coeffs.h",
25    "dyadic_decimator.h",
26    "moving_moments.cc",
27    "moving_moments.h",
28    "transient_detector.cc",
29    "transient_detector.h",
30    "transient_suppressor_impl.cc",
31    "transient_suppressor_impl.h",
32    "windows_private.h",
33    "wpd_node.cc",
34    "wpd_node.h",
35    "wpd_tree.cc",
36    "wpd_tree.h",
37  ]
38  deps = [
39    ":transient_suppressor_api",
40    "../../../common_audio:common_audio",
41    "../../../common_audio:common_audio_c",
42    "../../../common_audio:fir_filter",
43    "../../../common_audio:fir_filter_factory",
44    "../../../common_audio/third_party/ooura:fft_size_256",
45    "../../../rtc_base:checks",
46    "../../../rtc_base:gtest_prod",
47    "../../../rtc_base:logging",
48  ]
49}
50
51if (rtc_include_tests) {
52  rtc_executable("click_annotate") {
53    testonly = true
54    sources = [
55      "click_annotate.cc",
56      "file_utils.cc",
57      "file_utils.h",
58    ]
59    deps = [
60      ":transient_suppressor_impl",
61      "..:audio_processing",
62      "../../../rtc_base/system:file_wrapper",
63      "../../../system_wrappers",
64    ]
65  }
66
67  rtc_executable("transient_suppression_test") {
68    testonly = true
69    sources = [
70      "file_utils.cc",
71      "file_utils.h",
72      "transient_suppression_test.cc",
73    ]
74    deps = [
75      ":transient_suppressor_impl",
76      "..:audio_processing",
77      "../../../common_audio",
78      "../../../rtc_base:rtc_base_approved",
79      "../../../rtc_base/system:file_wrapper",
80      "../../../system_wrappers",
81      "../../../test:fileutils",
82      "../../../test:test_support",
83      "../agc:level_estimation",
84      "//testing/gtest",
85      "//third_party/abseil-cpp/absl/flags:flag",
86      "//third_party/abseil-cpp/absl/flags:parse",
87    ]
88  }
89
90  rtc_library("transient_suppression_unittests") {
91    testonly = true
92    sources = [
93      "dyadic_decimator_unittest.cc",
94      "file_utils.cc",
95      "file_utils.h",
96      "file_utils_unittest.cc",
97      "moving_moments_unittest.cc",
98      "transient_detector_unittest.cc",
99      "transient_suppressor_unittest.cc",
100      "wpd_node_unittest.cc",
101      "wpd_tree_unittest.cc",
102    ]
103    deps = [
104      ":transient_suppressor_impl",
105      "../../../rtc_base:stringutils",
106      "../../../rtc_base/system:file_wrapper",
107      "../../../test:fileutils",
108      "../../../test:test_support",
109      "//testing/gtest",
110    ]
111  }
112}
113