Reduce for reallocations the pre-amplifier and high-pass filter

This CL ensures that the pre-amplifier and the high-pass filter
submodules are not reallocated more than needed.

Bug: webrtc:5298
Change-Id: I7ed23807d4d2d9fef0eda2e7dca9de9b0b1a4649
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/163988
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30143}
This commit is contained in:
Per Åhgren
2020-01-03 14:27:14 +01:00
committed by Commit Bot
parent df344bb8de
commit 0f14db22de
3 changed files with 25 additions and 6 deletions

View File

@ -236,7 +236,8 @@ class AudioProcessingImpl : public AudioProcessing {
// Initializations of capture-only submodules, requiring the capture lock
// already acquired.
void InitializeHighPassFilter() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void InitializeHighPassFilter(bool forced_reset)
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void InitializeVoiceDetector() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void InitializeTransientSuppressor()
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);