Add one-stop-shop for built-in AEC toggling in APM
This does not change what AEC functionality is available. However, a client that only uses this interface - and not the submodule pointer accessors - gets simpler code, and is guaranteed not to run any two AECs in tandem. The submodule interface EchoControlMobile is being deprecated in https://webrtc-review.googlesource.com/c/src/+/89392 Bug: webrtc:9535 Change-Id: Id9326074e566be6d8768010fc421c457beff402c Reviewed-on: https://webrtc-review.googlesource.com/89386 Commit-Queue: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24066}
This commit is contained in:
committed by
Commit Bot
parent
33a373a160
commit
771b50ca0b
@ -253,6 +253,13 @@ class AudioProcessing : public rtc::RefCountInterface {
|
||||
// by changing the default values in the AudioProcessing::Config struct.
|
||||
// The config is applied by passing the struct to the ApplyConfig method.
|
||||
struct Config {
|
||||
// Configures whether acoustic echo cancellation is performed.
|
||||
// Has a specific tuning for mobile devices.
|
||||
struct EchoCancellation {
|
||||
bool enabled = false;
|
||||
bool mobile_mode = false;
|
||||
} echo_cancellation;
|
||||
|
||||
struct ResidualEchoDetector {
|
||||
bool enabled = true;
|
||||
} residual_echo_detector;
|
||||
@ -796,7 +803,7 @@ class ProcessingConfig {
|
||||
class EchoCancellation {
|
||||
public:
|
||||
// EchoCancellation and EchoControlMobile may not be enabled simultaneously.
|
||||
// Enabling one will disable the other.
|
||||
// If both are enabled, one (unspecified) will automatically be disabled.
|
||||
virtual int Enable(bool enable) = 0;
|
||||
virtual bool is_enabled() const = 0;
|
||||
|
||||
@ -900,7 +907,7 @@ class EchoCancellation {
|
||||
class EchoControlMobile {
|
||||
public:
|
||||
// EchoCancellation and EchoControlMobile may not be enabled simultaneously.
|
||||
// Enabling one will disable the other.
|
||||
// If both are enabled, one (unspecified) will automatically be disabled.
|
||||
virtual int Enable(bool enable) = 0;
|
||||
virtual bool is_enabled() const = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user