OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 constexpr size_t kNumMatchedFilters = 4; | 53 constexpr size_t kNumMatchedFilters = 4; |
54 constexpr size_t kMatchedFilterWindowSizeSubBlocks = 32; | 54 constexpr size_t kMatchedFilterWindowSizeSubBlocks = 32; |
55 constexpr size_t kMatchedFilterAlignmentShiftSizeSubBlocks = | 55 constexpr size_t kMatchedFilterAlignmentShiftSizeSubBlocks = |
56 kMatchedFilterWindowSizeSubBlocks * 3 / 4; | 56 kMatchedFilterWindowSizeSubBlocks * 3 / 4; |
57 constexpr size_t kDownsampledRenderBufferSize = | 57 constexpr size_t kDownsampledRenderBufferSize = |
58 kSubBlockSize * | 58 kSubBlockSize * |
59 (kMatchedFilterAlignmentShiftSizeSubBlocks * kNumMatchedFilters + | 59 (kMatchedFilterAlignmentShiftSizeSubBlocks * kNumMatchedFilters + |
60 kMatchedFilterWindowSizeSubBlocks + | 60 kMatchedFilterWindowSizeSubBlocks + |
61 1); | 61 1); |
62 | 62 |
63 constexpr float kFixedEchoPathGain = 100; | |
64 | |
65 constexpr size_t kRenderDelayBufferSize = | 63 constexpr size_t kRenderDelayBufferSize = |
66 (3 * kDownsampledRenderBufferSize) / (4 * kSubBlockSize); | 64 (3 * kDownsampledRenderBufferSize) / (4 * kSubBlockSize); |
67 | 65 |
68 constexpr size_t kMaxApiCallsJitterBlocks = 30; | 66 constexpr size_t kMaxApiCallsJitterBlocks = 30; |
69 constexpr size_t kRenderTransferQueueSize = kMaxApiCallsJitterBlocks / 2; | 67 constexpr size_t kRenderTransferQueueSize = kMaxApiCallsJitterBlocks / 2; |
70 static_assert(2 * kRenderTransferQueueSize >= kMaxApiCallsJitterBlocks, | 68 static_assert(2 * kRenderTransferQueueSize >= kMaxApiCallsJitterBlocks, |
71 "Requirement to ensure buffer overflow detection"); | 69 "Requirement to ensure buffer overflow detection"); |
72 | 70 |
73 // TODO(peah): Integrate this with how it is done inside audio_processing_impl. | 71 // TODO(peah): Integrate this with how it is done inside audio_processing_impl. |
74 constexpr size_t NumBandsForRate(int sample_rate_hz) { | 72 constexpr size_t NumBandsForRate(int sample_rate_hz) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 static_assert(ValidFullBandRate(32000), | 105 static_assert(ValidFullBandRate(32000), |
108 "Test that 32 kHz is a valid sample rate"); | 106 "Test that 32 kHz is a valid sample rate"); |
109 static_assert(ValidFullBandRate(48000), | 107 static_assert(ValidFullBandRate(48000), |
110 "Test that 48 kHz is a valid sample rate"); | 108 "Test that 48 kHz is a valid sample rate"); |
111 static_assert(!ValidFullBandRate(8001), | 109 static_assert(!ValidFullBandRate(8001), |
112 "Test that 8001 Hz is not a valid sample rate"); | 110 "Test that 8001 Hz is not a valid sample rate"); |
113 | 111 |
114 } // namespace webrtc | 112 } // namespace webrtc |
115 | 113 |
116 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ | 114 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ |
OLD | NEW |