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:
Sam Zackrisson
2018-07-23 15:21:52 +02:00
committed by Commit Bot
parent 33a373a160
commit 771b50ca0b
7 changed files with 64 additions and 30 deletions

View File

@ -393,6 +393,8 @@ class AudioProcessingImpl : public AudioProcessing {
int prev_analog_mic_level;
} capture_ RTC_GUARDED_BY(crit_capture_);
// This struct requires EITHER crit_capture_ OR crit_render_ to read, and
// requires both locks to write.
struct ApmCaptureNonLockedState {
ApmCaptureNonLockedState(bool intelligibility_enabled)
: capture_processing_format(kSampleRate16kHz),