Separate AEC3 config from AudioProcessing::Config.
The struct containing the config for AEC3 is removed from AudioProcessing::Config and is put in a new struct called EchoCanceller3Config. AEC3 should no longer be activated through AudioProcessing::ApplyConfig. Instead an EchoCanceller3Factory can be injected at AudioProcessing creation. Bug: webrtc:8346 Change-Id: I27e3592e675eec3632a60c45d9e0d12514c2c567 Reviewed-on: https://webrtc-review.googlesource.com/11420 Reviewed-by: Per Åhgren <peah@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20342}
This commit is contained in:
committed by
Commit Bot
parent
737e073f8d
commit
bd83b914c3
@ -27,9 +27,8 @@ namespace {
|
||||
|
||||
class RenderDelayControllerImpl final : public RenderDelayController {
|
||||
public:
|
||||
RenderDelayControllerImpl(
|
||||
const AudioProcessing::Config::EchoCanceller3& config,
|
||||
int sample_rate_hz);
|
||||
RenderDelayControllerImpl(const EchoCanceller3Config& config,
|
||||
int sample_rate_hz);
|
||||
~RenderDelayControllerImpl() override;
|
||||
void Reset() override;
|
||||
void SetDelay(size_t render_delay) override;
|
||||
@ -75,12 +74,12 @@ size_t ComputeNewBufferDelay(size_t current_delay,
|
||||
int RenderDelayControllerImpl::instance_count_ = 0;
|
||||
|
||||
RenderDelayControllerImpl::RenderDelayControllerImpl(
|
||||
const AudioProcessing::Config::EchoCanceller3& config,
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz)
|
||||
: data_dumper_(
|
||||
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
|
||||
default_delay_(
|
||||
std::max(config.param.delay.default_delay, kMinEchoPathDelayBlocks)),
|
||||
std::max(config.delay.default_delay, kMinEchoPathDelayBlocks)),
|
||||
delay_(default_delay_),
|
||||
delay_estimator_(data_dumper_.get(), config),
|
||||
echo_path_delay_samples_(default_delay_ * kBlockSize),
|
||||
@ -170,7 +169,7 @@ size_t RenderDelayControllerImpl::GetDelay(
|
||||
} // namespace
|
||||
|
||||
RenderDelayController* RenderDelayController::Create(
|
||||
const AudioProcessing::Config::EchoCanceller3& config,
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz) {
|
||||
return new RenderDelayControllerImpl(config, sample_rate_hz);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user