OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ |
| 13 |
| 14 #include <memory> |
| 15 #include <vector> |
| 16 |
| 17 #include "webrtc/base/array_view.h" |
| 18 |
| 19 namespace webrtc { |
| 20 |
| 21 class AudioBuffer; |
| 22 class EchoDetector; |
| 23 |
| 24 class ResidualEchoDetector { |
| 25 public: |
| 26 ResidualEchoDetector(); |
| 27 ~ResidualEchoDetector(); |
| 28 |
| 29 // This function should be called while holding the render lock. |
| 30 void AnalyzeRenderAudio(rtc::ArrayView<const float> render_audio) const; |
| 31 |
| 32 // This function should be called while holding the capture lock. |
| 33 void AnalyzeCaptureAudio(rtc::ArrayView<const float> capture_audio); |
| 34 |
| 35 // This function should be called while holding the capture lock. |
| 36 void Initialize(); |
| 37 |
| 38 static void PackRenderAudioBuffer(AudioBuffer* audio, |
| 39 std::vector<float>* packed_buffer); |
| 40 |
| 41 // This function should be called while holding the capture lock. |
| 42 float get_echo_likelihood() const; |
| 43 }; |
| 44 |
| 45 } // namespace webrtc |
| 46 |
| 47 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ |
OLD | NEW |