Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: webrtc/modules/audio_processing/aec3/render_signal_analyzer_unittest.cc

Issue 3007763002: Move array_view.h to webrtc/api/ (Closed)
Patch Set: rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/render_signal_analyzer.h" 11 #include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h"
12 12
13 #include <math.h> 13 #include <math.h>
14 #include <array> 14 #include <array>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/api/array_view.h"
17 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" 18 #include "webrtc/modules/audio_processing/aec3/aec3_common.h"
18 #include "webrtc/modules/audio_processing/aec3/aec3_fft.h" 19 #include "webrtc/modules/audio_processing/aec3/aec3_fft.h"
19 #include "webrtc/modules/audio_processing/aec3/fft_data.h" 20 #include "webrtc/modules/audio_processing/aec3/fft_data.h"
20 #include "webrtc/modules/audio_processing/aec3/render_buffer.h" 21 #include "webrtc/modules/audio_processing/aec3/render_buffer.h"
21 #include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h" 22 #include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
22 #include "webrtc/rtc_base/array_view.h"
23 #include "webrtc/rtc_base/random.h" 23 #include "webrtc/rtc_base/random.h"
24 #include "webrtc/test/gtest.h" 24 #include "webrtc/test/gtest.h"
25 25
26 namespace webrtc { 26 namespace webrtc {
27 namespace { 27 namespace {
28 28
29 constexpr float kPi = 3.141592f; 29 constexpr float kPi = 3.141592f;
30 30
31 void ProduceSinusoid(int sample_rate_hz, 31 void ProduceSinusoid(int sample_rate_hz,
32 float sinusoidal_frequency_hz, 32 float sinusoidal_frequency_hz,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Verify that no bands are detected as narrow when the delay is unknown. 114 // Verify that no bands are detected as narrow when the delay is unknown.
115 generate_sinusoid_test(false); 115 generate_sinusoid_test(false);
116 mask.fill(1.f); 116 mask.fill(1.f);
117 analyzer.MaskRegionsAroundNarrowBands(&mask); 117 analyzer.MaskRegionsAroundNarrowBands(&mask);
118 std::for_each(mask.begin(), mask.end(), [](float a) { EXPECT_EQ(1.f, a); }); 118 std::for_each(mask.begin(), mask.end(), [](float a) { EXPECT_EQ(1.f, a); });
119 EXPECT_FALSE(analyzer.PoorSignalExcitation()); 119 EXPECT_FALSE(analyzer.PoorSignalExcitation());
120 } 120 }
121 121
122 } // namespace webrtc 122 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698