| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void UpdateCaptureSaturation(bool capture_signal_saturation) { | 69 void UpdateCaptureSaturation(bool capture_signal_saturation) { |
| 70 capture_signal_saturation_ = capture_signal_saturation; | 70 capture_signal_saturation_ = capture_signal_saturation; |
| 71 } | 71 } |
| 72 | 72 |
| 73 // Returns whether a probable headset setup has been detected. | 73 // Returns whether a probable headset setup has been detected. |
| 74 bool HeadsetDetected() const { return headset_detected_; } | 74 bool HeadsetDetected() const { return headset_detected_; } |
| 75 | 75 |
| 76 // Takes appropriate action at an echo path change. | 76 // Takes appropriate action at an echo path change. |
| 77 void HandleEchoPathChange(const EchoPathVariability& echo_path_variability); | 77 void HandleEchoPathChange(const EchoPathVariability& echo_path_variability); |
| 78 | 78 |
| 79 // Returns the decay factor for the echo reverberation. |
| 80 // TODO(peah): Make this adaptive. |
| 81 float ReverbDecayFactor() const { return 0.f; } |
| 82 |
| 79 // Updates the aec state. | 83 // Updates the aec state. |
| 80 void Update(const std::vector<std::array<float, kFftLengthBy2Plus1>>& | 84 void Update(const std::vector<std::array<float, kFftLengthBy2Plus1>>& |
| 81 adaptive_filter_frequency_response, | 85 adaptive_filter_frequency_response, |
| 82 const rtc::Optional<size_t>& external_delay_samples, | 86 const rtc::Optional<size_t>& external_delay_samples, |
| 83 const RenderBuffer& render_buffer, | 87 const RenderBuffer& render_buffer, |
| 84 const std::array<float, kFftLengthBy2Plus1>& E2_main, | 88 const std::array<float, kFftLengthBy2Plus1>& E2_main, |
| 85 const std::array<float, kFftLengthBy2Plus1>& Y2, | 89 const std::array<float, kFftLengthBy2Plus1>& Y2, |
| 86 rtc::ArrayView<const float> x, | 90 rtc::ArrayView<const float> x, |
| 87 bool echo_leakage_detected); | 91 bool echo_leakage_detected); |
| 88 | 92 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 102 rtc::Optional<size_t> filter_delay_; | 106 rtc::Optional<size_t> filter_delay_; |
| 103 rtc::Optional<size_t> external_delay_; | 107 rtc::Optional<size_t> external_delay_; |
| 104 size_t blocks_since_last_saturation_ = 1000; | 108 size_t blocks_since_last_saturation_ = 1000; |
| 105 | 109 |
| 106 RTC_DISALLOW_COPY_AND_ASSIGN(AecState); | 110 RTC_DISALLOW_COPY_AND_ASSIGN(AecState); |
| 107 }; | 111 }; |
| 108 | 112 |
| 109 } // namespace webrtc | 113 } // namespace webrtc |
| 110 | 114 |
| 111 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_ | 115 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC_STATE_H_ |
| OLD | NEW |