Chromium Code Reviews| 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..b213205d68d1aaae614734408bea028e32683c89 100644 |
| --- a/webrtc/modules/audio_processing/aec3/echo_canceller3.cc |
| +++ b/webrtc/modules/audio_processing/aec3/echo_canceller3.cc |
| @@ -200,14 +200,20 @@ void EchoCanceller3::RenderWriter::Insert(AudioBuffer* input) { |
| int EchoCanceller3::instance_count_ = 0; |
| -EchoCanceller3::EchoCanceller3(int sample_rate_hz, bool use_highpass_filter) |
| - : EchoCanceller3(sample_rate_hz, |
| +EchoCanceller3::EchoCanceller3( |
| + const AudioProcessing::Config::EchoCanceller3& config, |
| + int sample_rate_hz, |
| + bool use_highpass_filter) |
| + : EchoCanceller3(config, |
| + sample_rate_hz, |
| use_highpass_filter, |
| std::unique_ptr<BlockProcessor>( |
| - BlockProcessor::Create(sample_rate_hz))) {} |
| -EchoCanceller3::EchoCanceller3(int sample_rate_hz, |
| - bool use_highpass_filter, |
| - std::unique_ptr<BlockProcessor> block_processor) |
| + BlockProcessor::Create(config, sample_rate_hz))) {} |
| +EchoCanceller3::EchoCanceller3( |
| + const AudioProcessing::Config::EchoCanceller3& config, |
|
ivoc
2017/06/30 11:40:03
This argument is also not used, Is it needed?
peah-webrtc
2017/06/30 13:20:16
No, you are totally right. Good point and find!
D
|
| + int sample_rate_hz, |
| + bool use_highpass_filter, |
| + std::unique_ptr<BlockProcessor> block_processor) |
| : data_dumper_( |
| new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), |
| sample_rate_hz_(sample_rate_hz), |
| @@ -331,7 +337,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() { |