mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Remove legacy EchoControlFactory::Create
Bug: webrtc:10913 Change-Id: I34af9abe76f5b08d7dc5c3e0281fafc14a71eed8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159031 Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29741}
This commit is contained in:
parent
b61ad3ac22
commit
2c6f373a27
5 changed files with 3 additions and 21 deletions
|
@ -20,11 +20,6 @@ EchoCanceller3Factory::EchoCanceller3Factory() {}
|
|||
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,
|
||||
|
|
|
@ -28,12 +28,7 @@ class RTC_EXPORT EchoCanceller3Factory : public EchoControlFactory {
|
|||
// configuration.
|
||||
explicit EchoCanceller3Factory(const EchoCanceller3Config& config);
|
||||
|
||||
// Creates an EchoCanceller3 running at the specified sampling rate using a
|
||||
// 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.
|
||||
// Creates an EchoCanceller3 with a specified channel count and sampling rate.
|
||||
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
|
||||
int num_render_channels,
|
||||
int num_capture_channels) override;
|
||||
|
|
|
@ -52,14 +52,9 @@ class EchoControl {
|
|||
// Interface for a factory that creates EchoControllers.
|
||||
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) {
|
||||
RTC_NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
int num_capture_channels) = 0;
|
||||
|
||||
virtual ~EchoControlFactory() = default;
|
||||
};
|
||||
|
|
|
@ -1783,6 +1783,7 @@ void AudioProcessingImpl::InitializeEchoController() {
|
|||
if (echo_control_factory_) {
|
||||
submodules_.echo_controller = echo_control_factory_->Create(
|
||||
proc_sample_rate_hz(), num_reverse_channels(), num_proc_channels());
|
||||
RTC_DCHECK(submodules_.echo_controller);
|
||||
} else {
|
||||
submodules_.echo_controller = std::make_unique<EchoCanceller3>(
|
||||
EchoCanceller3Config(), proc_sample_rate_hz(), num_reverse_channels(),
|
||||
|
|
|
@ -53,10 +53,6 @@ class MockEchoControlFactory : public EchoControlFactory {
|
|||
MockEchoControlFactory() : next_mock_(std::make_unique<MockEchoControl>()) {}
|
||||
// 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 {
|
||||
|
|
Loading…
Reference in a new issue