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}
diff --git a/modules/audio_processing/audio_processing_impl.h b/modules/audio_processing/audio_processing_impl.h
index 77eae38..4246594 100644
--- a/modules/audio_processing/audio_processing_impl.h
+++ b/modules/audio_processing/audio_processing_impl.h
@@ -236,7 +236,8 @@
// 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_);