Index: webrtc/modules/audio_processing/aec3/aec3_common.h |
diff --git a/webrtc/modules/audio_processing/aec3/aec3_common.h b/webrtc/modules/audio_processing/aec3/aec3_common.h |
index 480f12c66836256ecb19593a6a0b2c961a6c1aa7..ef7dcdf261bdeefd7d13a66794ece7cadfa1f6f2 100644 |
--- a/webrtc/modules/audio_processing/aec3/aec3_common.h |
+++ b/webrtc/modules/audio_processing/aec3/aec3_common.h |
@@ -26,12 +26,15 @@ namespace webrtc { |
enum class Aec3Optimization { kNone, kSse2 }; |
-constexpr int kMetricsReportingIntervalBlocks = 10 * 250; |
+constexpr int kNumBlocksPerSecond = 250; |
+ |
+constexpr int kMetricsReportingIntervalBlocks = 10 * kNumBlocksPerSecond; |
constexpr int kMetricsComputationBlocks = 9; |
constexpr int kMetricsCollectionBlocks = |
kMetricsReportingIntervalBlocks - kMetricsComputationBlocks; |
constexpr int kAdaptiveFilterLength = 12; |
+constexpr int kResidualEchoPowerRenderWindowSize = 30; |
constexpr size_t kFftLengthBy2 = 64; |
constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1; |
@@ -55,11 +58,15 @@ constexpr size_t kDownsampledRenderBufferSize = |
kMatchedFilterWindowSizeSubBlocks + |
1); |
+constexpr float kFixedEchoPathGain = 100; |
+ |
constexpr size_t kRenderDelayBufferSize = |
(3 * kDownsampledRenderBufferSize) / (4 * kSubBlockSize); |
constexpr size_t kMaxApiCallsJitterBlocks = 10; |
constexpr size_t kRenderTransferQueueSize = kMaxApiCallsJitterBlocks / 2; |
+static_assert(2 * kRenderTransferQueueSize >= kMaxApiCallsJitterBlocks, |
+ "Requirement to ensure buffer overflow detection"); |
constexpr size_t NumBandsForRate(int sample_rate_hz) { |
return static_cast<size_t>(sample_rate_hz == 8000 ? 1 |