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

Unified Diff: webrtc/modules/audio_processing/high_pass_filter_unittest.cc

Issue 2415403002: Introduced the new parameter setting scheme for activating the high-pass filter in APM (Closed)
Patch Set: New approach for introducing the new parameter setting scheme Created 4 years, 2 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/high_pass_filter_unittest.cc
diff --git a/webrtc/modules/audio_processing/high_pass_filter_unittest.cc b/webrtc/modules/audio_processing/high_pass_filter_unittest.cc
index 932b5c3762dd1f37832948a11da90af957523bac..de17cf954810e0f8ed38ed310d6d2e2bcc2fe124 100644
--- a/webrtc/modules/audio_processing/high_pass_filter_unittest.cc
+++ b/webrtc/modules/audio_processing/high_pass_filter_unittest.cc
@@ -11,7 +11,7 @@
#include "webrtc/base/array_view.h"
#include "webrtc/modules/audio_processing/audio_buffer.h"
-#include "webrtc/modules/audio_processing/high_pass_filter_impl.h"
+#include "webrtc/modules/audio_processing/biquad_high_pass_filter.h"
#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
#include "webrtc/test/gtest.h"
@@ -22,14 +22,14 @@ namespace {
// Process one frame of data and produce the output.
std::vector<float> ProcessOneFrame(const std::vector<float>& frame_input,
const StreamConfig& stream_config,
- HighPassFilterImpl* high_pass_filter) {
+ BiquadHighPassFilter* high_pass_filter) {
AudioBuffer audio_buffer(
stream_config.num_frames(), stream_config.num_channels(),
stream_config.num_frames(), stream_config.num_channels(),
stream_config.num_frames());
test::CopyVectorToAudioBuffer(stream_config, frame_input, &audio_buffer);
- high_pass_filter->ProcessCaptureAudio(&audio_buffer);
+ high_pass_filter->Process(&audio_buffer);
std::vector<float> frame_output;
test::ExtractVectorFromAudioBuffer(stream_config, &audio_buffer,
&frame_output);
@@ -43,11 +43,7 @@ void RunBitexactnessTest(int sample_rate,
const std::vector<float>& input,
const std::vector<float>& reference) {
const StreamConfig stream_config(sample_rate, num_channels, false);
- rtc::CriticalSection crit;
- HighPassFilterImpl high_pass_filter(&crit);
-
- high_pass_filter.Initialize(num_channels, sample_rate);
- high_pass_filter.Enable(true);
+ BiquadHighPassFilter high_pass_filter(num_channels, sample_rate);
std::vector<float> output;
const size_t num_frames_to_process =

Powered by Google App Engine
This is Rietveld 408576698