Index: webrtc/modules/audio_processing/aec3/echo_canceller3.cc |
diff --git a/webrtc/modules/audio_processing/aec3/echo_canceller3.cc b/webrtc/modules/audio_processing/aec3/echo_canceller3.cc |
index 4cd9c39729c2b3d2ae65660fabc0be0f8eff4849..3175c5414c0ae82295e94cea0f518d80f6049f34 100644 |
--- a/webrtc/modules/audio_processing/aec3/echo_canceller3.cc |
+++ b/webrtc/modules/audio_processing/aec3/echo_canceller3.cc |
@@ -200,11 +200,14 @@ void EchoCanceller3::RenderWriter::Insert(AudioBuffer* input) { |
int EchoCanceller3::instance_count_ = 0; |
-EchoCanceller3::EchoCanceller3(int sample_rate_hz, bool use_highpass_filter) |
+EchoCanceller3::EchoCanceller3( |
+ const AudioProcessing::Config::EchoCanceller3& config, |
+ int sample_rate_hz, |
+ bool use_highpass_filter) |
: EchoCanceller3(sample_rate_hz, |
use_highpass_filter, |
std::unique_ptr<BlockProcessor>( |
- BlockProcessor::Create(sample_rate_hz))) {} |
+ BlockProcessor::Create(config, sample_rate_hz))) {} |
EchoCanceller3::EchoCanceller3(int sample_rate_hz, |
bool use_highpass_filter, |
std::unique_ptr<BlockProcessor> block_processor) |
@@ -331,7 +334,7 @@ std::string EchoCanceller3::ToString( |
bool EchoCanceller3::Validate( |
const AudioProcessing::Config::EchoCanceller3& config) { |
- return true; |
+ return (config.echo_decay >= 0.f && config.echo_decay < 1.f); |
} |
void EchoCanceller3::EmptyRenderQueue() { |