Revert "Reland "Correct AEC3 multichannel functionality activation""

This reverts commit d5a7838926b839469db1072d72a92e6814f2faeb.

Reason for revert: Causing errors in downstream tests.

Original change's description:
> Reland "Correct AEC3 multichannel functionality activation"
> 
> This is a reland of 9dda1b3a484ebeef921e419406402039f3852427
> 
> Original change's description:
> > Correct AEC3 multichannel functionality activation
> > 
> > This CL corrects the AEC3 multichannel activation
> > to also work for the case when a factory is used
> > for the activation.
> > 
> > Bug: webrtc:10913
> > Change-Id: Ic2807d8bcef759261fde14447cff30633ba248dc
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158794
> > Commit-Queue: Per Åhgren <peah@webrtc.org>
> > Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#29676}
> 
> Bug: webrtc:10913
> Change-Id: Ibfe4e8a51183390a4054514bb294c89c2ea201e9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158880
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29685}

TBR=saza@webrtc.org,peah@webrtc.org

Change-Id: I6e27bc7fd1c9d4d5550fdc6ae14c39ca84fb03f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10913
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158883
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29687}
This commit is contained in:
Per Åhgren 2019-11-05 09:53:53 +00:00 committed by Commit Bot
parent 3ac6375bb3
commit 1983458981
6 changed files with 8 additions and 34 deletions

View File

@ -21,16 +21,9 @@ EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config)
: config_(config) {}
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(int sample_rate_hz) {
return Create(sample_rate_hz, /*num_render_channels=*/1,
/*num_capture_channels=*/1);
}
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(
int sample_rate_hz,
int num_render_channels,
int num_capture_channels) {
return std::make_unique<EchoCanceller3>(
config_, sample_rate_hz, num_render_channels, num_capture_channels);
return std::make_unique<EchoCanceller3>(config_, sample_rate_hz,
/*num_render_channels=*/1,
/*num_capture_channels=*/1);
}
} // namespace webrtc

View File

@ -29,15 +29,9 @@ class RTC_EXPORT EchoCanceller3Factory : public EchoControlFactory {
explicit EchoCanceller3Factory(const EchoCanceller3Config& config);
// Creates an EchoCanceller3 running at the specified sampling rate using a
// mono setup.
// mono setup
std::unique_ptr<EchoControl> Create(int sample_rate_hz) override;
// Creates an EchoCanceller3 running at the specified sampling rate using a
// multichannel setup.
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) override;
private:
const EchoCanceller3Config config_;
};

View File

@ -51,13 +51,6 @@ class EchoControl {
class EchoControlFactory {
public:
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz) = 0;
// TODO(peah): Make pure virtual.
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) {
return nullptr;
}
virtual ~EchoControlFactory() = default;
};
} // namespace webrtc

View File

@ -1783,8 +1783,8 @@ void AudioProcessingImpl::InitializeEchoController() {
if (use_echo_controller) {
// Create and activate the echo controller.
if (echo_control_factory_) {
submodules_.echo_controller = echo_control_factory_->Create(
proc_sample_rate_hz(), num_reverse_channels(), num_proc_channels());
submodules_.echo_controller =
echo_control_factory_->Create(proc_sample_rate_hz());
} else {
submodules_.echo_controller = std::make_unique<EchoCanceller3>(
EchoCanceller3Config(), proc_sample_rate_hz(), num_reverse_channels(),

View File

@ -54,12 +54,6 @@ class MockEchoControlFactory : public EchoControlFactory {
// Returns a pointer to the next MockEchoControl that this factory creates.
MockEchoControl* GetNext() const { return next_mock_.get(); }
std::unique_ptr<EchoControl> Create(int sample_rate_hz) override {
RTC_NOTREACHED();
return nullptr;
}
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) override {
std::unique_ptr<EchoControl> mock = std::move(next_mock_);
next_mock_ = std::make_unique<MockEchoControl>();
return mock;

View File

@ -2430,8 +2430,8 @@ class MyEchoControlFactory : public EchoControlFactory {
}
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) {
size_t num_render_channels,
size_t num_capture_channels) {
return Create(sample_rate_hz);
}
};