OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 #include "webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h" | 10 #include "webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Require the same lag to be detected 10 times in a row before considering | 52 // Require the same lag to be detected 10 times in a row before considering |
53 // it reliable. | 53 // it reliable. |
54 if (best_lag_estimate_index >= 0) { | 54 if (best_lag_estimate_index >= 0) { |
55 candidate_counter_ = | 55 candidate_counter_ = |
56 (candidate_ == lag_estimates[best_lag_estimate_index].lag) | 56 (candidate_ == lag_estimates[best_lag_estimate_index].lag) |
57 ? candidate_counter_ + 1 | 57 ? candidate_counter_ + 1 |
58 : 0; | 58 : 0; |
59 candidate_ = lag_estimates[best_lag_estimate_index].lag; | 59 candidate_ = lag_estimates[best_lag_estimate_index].lag; |
60 } | 60 } |
61 | 61 |
62 return candidate_counter_ >= 10 ? rtc::Optional<size_t>(candidate_) | 62 return candidate_counter_ >= 15 ? rtc::Optional<size_t>(candidate_) |
63 : rtc::Optional<size_t>(); | 63 : rtc::Optional<size_t>(); |
64 } | 64 } |
65 | 65 |
66 } // namespace webrtc | 66 } // namespace webrtc |
OLD | NEW |