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

Unified Diff: webrtc/modules/audio_processing/aec3/subtractor_unittest.cc

Issue 3003733002: Utilizing the AEC3 config struct for constants. (Closed)
Patch Set: Added comment Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
diff --git a/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc b/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
index 32fc054bf708c868e2568ca3829ad46bab3b8755..07b121337a93fa9277f35973ff3db78fa8f63394 100644
--- a/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
+++ b/webrtc/modules/audio_processing/aec3/subtractor_unittest.cc
@@ -40,7 +40,7 @@ float RunSubtractorTest(int num_blocks_to_process,
std::array<float, kFftLengthBy2Plus1> Y2;
std::array<float, kFftLengthBy2Plus1> E2_main;
std::array<float, kFftLengthBy2Plus1> E2_shadow;
- AecState aec_state(0.f);
+ AecState aec_state(AudioProcessing::Config::EchoCanceller3{});
x_old.fill(0.f);
Y2.fill(0.f);
E2_main.fill(0.f);
@@ -109,9 +109,11 @@ TEST(Subtractor, DISABLED_NullOutput) {
RenderSignalAnalyzer render_signal_analyzer;
std::vector<float> y(kBlockSize, 0.f);
- EXPECT_DEATH(subtractor.Process(render_buffer, y, render_signal_analyzer,
- AecState(0.f), nullptr),
- "");
+ EXPECT_DEATH(
+ subtractor.Process(render_buffer, y, render_signal_analyzer,
+ AecState(AudioProcessing::Config::EchoCanceller3{}),
+ nullptr),
+ "");
}
// Verifies the check for the capture signal size.
@@ -124,9 +126,11 @@ TEST(Subtractor, WrongCaptureSize) {
std::vector<float> y(kBlockSize - 1, 0.f);
SubtractorOutput output;
- EXPECT_DEATH(subtractor.Process(render_buffer, y, render_signal_analyzer,
- AecState(0.f), &output),
- "");
+ EXPECT_DEATH(
+ subtractor.Process(render_buffer, y, render_signal_analyzer,
+ AecState(AudioProcessing::Config::EchoCanceller3{}),
+ &output),
+ "");
}
#endif

Powered by Google App Engine
This is Rietveld 408576698