APM: Move the TransientSuppression activation to the apm_config
This CL moves the activation of the transient suppression to the APM config. Bug: webrtc:5298 Change-Id: Iba7975bec4654c3df8834fd5b7d1082ff53641dd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163985 Reviewed-by: Sam Zackrisson <saza@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30137}
This commit is contained in:
@ -225,24 +225,29 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
bool UpdateActiveSubmoduleStates()
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
|
||||
// Methods requiring APM running in a single-threaded manner.
|
||||
// Are called with both the render and capture locks already
|
||||
// acquired.
|
||||
void InitializeTransient()
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
|
||||
// Methods requiring APM running in a single-threaded manner, requiring both
|
||||
// the render and capture lock to be acquired.
|
||||
int InitializeLocked(const ProcessingConfig& config)
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
|
||||
void InitializeResidualEchoDetector()
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
|
||||
void InitializeHighPassFilter() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeVoiceDetector() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeEchoController()
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_);
|
||||
|
||||
// Initializations of capture-only submodules, requiring the capture lock
|
||||
// already acquired.
|
||||
void InitializeHighPassFilter() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeVoiceDetector() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeTransientSuppressor()
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeGainController2() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeNoiseSuppressor() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializePreAmplifier() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializePostProcessor() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
void InitializeAnalyzer() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
|
||||
|
||||
// Initializations of render-only submodules, requiring the render lock
|
||||
// already acquired.
|
||||
void InitializePreProcessor() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
|
||||
|
||||
// Sample rate used for the fullband processing.
|
||||
@ -400,13 +405,12 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
} constants_;
|
||||
|
||||
struct ApmCaptureState {
|
||||
ApmCaptureState(bool transient_suppressor_enabled);
|
||||
ApmCaptureState();
|
||||
~ApmCaptureState();
|
||||
int delay_offset_ms;
|
||||
bool was_stream_delay_set;
|
||||
bool output_will_be_muted;
|
||||
bool key_pressed;
|
||||
bool transient_suppressor_enabled;
|
||||
std::unique_ptr<AudioBuffer> capture_audio;
|
||||
std::unique_ptr<AudioBuffer> capture_fullband_audio;
|
||||
std::unique_ptr<AudioBuffer> linear_aec_output;
|
||||
|
||||
Reference in New Issue
Block a user