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

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

Issue 2584493002: Added first layer of the echo canceller 3 functionality (Closed)
Patch Set: Minor changes Created 3 years, 12 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include <memory>
12 #include <string>
13 #include <vector>
14
15 #include "webrtc/modules/audio_processing/aec3/aec3_constants.h"
16 #include "webrtc/modules/audio_processing/aec3/block_processor.h"
hlundin-webrtc 2016/12/22 10:23:56 This goes at the top.
peah-webrtc 2016/12/22 16:40:03 Done.
17 #include "webrtc/test/gtest.h"
18
19 namespace webrtc {
20 namespace {
21
22 // Verifies that the basic BlockProcessor functionality works and that the API
23 // methods are callable.
24 void RunBasicSetupAndApiCallTest(int sample_rate_hz, size_t num_bands) {
25 std::unique_ptr<BlockProcessor> block_processor(
26 BlockProcessor::Create(sample_rate_hz, num_bands));
27 std::vector<std::vector<float>> block(num_bands,
28 std::vector<float>(kBlockSize, 0.f));
29
30 EXPECT_FALSE(block_processor->BufferRender(&block));
31 block_processor->ProcessCapture(false, false, &block);
32 block_processor->ReportEchoLeakage(false);
33 }
34
35 } // namespace
36
37 TEST(BlockProcessor, BasicSetupAndApiCalls) {
38 for (auto rate : {8000, 16000, 32000, 48000}) {
39 std::ostringstream ss;
40 ss << "Sample rate: " << rate;
41 SCOPED_TRACE(ss.str());
42 RunBasicSetupAndApiCallTest(rate, NumBandsForRate(rate));
43 }
44 }
45
46 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698