OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/audio_processing/aec3/suppression_gain.h" | 11 #include "webrtc/modules/audio_processing/aec3/suppression_gain.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/rtc_base/checks.h" |
14 #include "webrtc/system_wrappers/include/cpu_features_wrapper.h" | 14 #include "webrtc/system_wrappers/include/cpu_features_wrapper.h" |
15 #include "webrtc/test/gtest.h" | 15 #include "webrtc/test/gtest.h" |
16 #include "webrtc/typedefs.h" | 16 #include "webrtc/typedefs.h" |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 namespace aec3 { | 19 namespace aec3 { |
20 | 20 |
21 #if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 21 #if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
22 | 22 |
23 // Verifies that the check for non-null output gains works. | 23 // Verifies that the check for non-null output gains works. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 [](float a) { EXPECT_NEAR(0.f, a, 0.001); }); | 80 [](float a) { EXPECT_NEAR(0.f, a, 0.001); }); |
81 | 81 |
82 // Verify the functionality for forcing a zero gain. | 82 // Verify the functionality for forcing a zero gain. |
83 suppression_gain.GetGain(E2, R2, N2, false, x, true, &high_bands_gain, &g); | 83 suppression_gain.GetGain(E2, R2, N2, false, x, true, &high_bands_gain, &g); |
84 std::for_each(g.begin(), g.end(), [](float a) { EXPECT_FLOAT_EQ(0.f, a); }); | 84 std::for_each(g.begin(), g.end(), [](float a) { EXPECT_FLOAT_EQ(0.f, a); }); |
85 EXPECT_FLOAT_EQ(0.f, high_bands_gain); | 85 EXPECT_FLOAT_EQ(0.f, high_bands_gain); |
86 } | 86 } |
87 | 87 |
88 } // namespace aec3 | 88 } // namespace aec3 |
89 } // namespace webrtc | 89 } // namespace webrtc |
OLD | NEW |