| 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 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // Returns whether there has been echo leakage detected. | 40 // Returns whether there has been echo leakage detected. |
| 41 bool EchoLeakageDetected() const { return echo_leakage_detected_; } | 41 bool EchoLeakageDetected() const { return echo_leakage_detected_; } |
| 42 | 42 |
| 43 // Returns whether it is possible at all to use the model based echo removal | 43 // Returns whether it is possible at all to use the model based echo removal |
| 44 // functionalities. | 44 // functionalities. |
| 45 bool ModelBasedAecFeasible() const { return model_based_aec_feasible_; } | 45 bool ModelBasedAecFeasible() const { return model_based_aec_feasible_; } |
| 46 | 46 |
| 47 // Returns whether the render signal is currently active. | 47 // Returns whether the render signal is currently active. |
| 48 bool ActiveRender() const { return active_render_counter_ > 0; } | 48 bool ActiveRender() const { return active_render_counter_ > 0; } |
| 49 | 49 |
| 50 // Returns whether the number of active render blocks since an echo path |
| 51 // change. |
| 52 size_t ActiveRenderBlocks() const { return active_render_blocks_; } |
| 53 |
| 50 // Returns the ERLE. | 54 // Returns the ERLE. |
| 51 const std::array<float, kFftLengthBy2Plus1>& Erle() const { | 55 const std::array<float, kFftLengthBy2Plus1>& Erle() const { |
| 52 return erle_estimator_.Erle(); | 56 return erle_estimator_.Erle(); |
| 53 } | 57 } |
| 54 | 58 |
| 55 // Returns the ERL. | 59 // Returns the ERL. |
| 56 const std::array<float, kFftLengthBy2Plus1>& Erl() const { | 60 const std::array<float, kFftLengthBy2Plus1>& Erl() const { |
| 57 return erl_estimator_.Erl(); | 61 return erl_estimator_.Erl(); |
| 58 } | 62 } |
| 59 | 63 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const EchoPathVariability& echo_path_variability, | 105 const EchoPathVariability& echo_path_variability, |
| 102 bool echo_leakage_detected); | 106 bool echo_leakage_detected); |
| 103 | 107 |
| 104 private: | 108 private: |
| 105 static int instance_count_; | 109 static int instance_count_; |
| 106 std::unique_ptr<ApmDataDumper> data_dumper_; | 110 std::unique_ptr<ApmDataDumper> data_dumper_; |
| 107 ErlEstimator erl_estimator_; | 111 ErlEstimator erl_estimator_; |
| 108 ErleEstimator erle_estimator_; | 112 ErleEstimator erle_estimator_; |
| 109 int echo_path_change_counter_; | 113 int echo_path_change_counter_; |
| 110 int active_render_counter_; | 114 int active_render_counter_; |
| 115 size_t active_render_blocks_ = 0; |
| 111 bool usable_linear_estimate_ = false; | 116 bool usable_linear_estimate_ = false; |
| 112 bool echo_leakage_detected_ = false; | 117 bool echo_leakage_detected_ = false; |
| 113 bool model_based_aec_feasible_ = false; | 118 bool model_based_aec_feasible_ = false; |
| 114 bool capture_signal_saturation_ = false; | 119 bool capture_signal_saturation_ = false; |
| 115 bool headset_detected_ = false; | 120 bool headset_detected_ = false; |
| 116 rtc::Optional<size_t> filter_delay_; | 121 rtc::Optional<size_t> filter_delay_; |
| 117 rtc::Optional<size_t> external_delay_; | 122 rtc::Optional<size_t> external_delay_; |
| 118 std::array<bool, kFftLengthBy2Plus1> bands_with_reliable_filter_; | 123 std::array<bool, kFftLengthBy2Plus1> bands_with_reliable_filter_; |
| 119 std::array<float, kFftLengthBy2Plus1> filter_estimate_strength_; | 124 std::array<float, kFftLengthBy2Plus1> filter_estimate_strength_; |
| 120 size_t filter_length_; | 125 size_t filter_length_; |
| 121 | 126 |
| 122 RTC_DISALLOW_COPY_AND_ASSIGN(AecState); | 127 RTC_DISALLOW_COPY_AND_ASSIGN(AecState); |
| 123 }; | 128 }; |
| 124 | 129 |
| 125 } // namespace webrtc | 130 } // namespace webrtc |
| 126 | 131 |
| 127 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_ | 132 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_ |
| OLD | NEW |