Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: webrtc/modules/audio_processing/residual_echo_detector.h

Issue 2419563003: Add algorithm for Residual Echo Detector. (Closed)
Patch Set: Per's comments. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 31
32 // This function should be called while holding the render lock. 32 // This function should be called while holding the render lock.
33 // Returns 0 on success and -1 when the render buffer is full. In that case, 33 // Returns 0 on success and -1 when the render buffer is full. In that case,
34 // ReadQueuedRenderData() should be called before calling this function again. 34 // ReadQueuedRenderData() should be called before calling this function again.
35 int AnalyzeRenderAudio(const AudioBuffer* audio) const; 35 int AnalyzeRenderAudio(const AudioBuffer* audio) const;
36 36
37 // This function should be called while holding the capture lock. 37 // This function should be called while holding the capture lock.
38 void AnalyzeCaptureAudio(const AudioBuffer* audio); 38 void AnalyzeCaptureAudio(const AudioBuffer* audio);
39 39
40 // This function should be called while holding the capture lock. 40 // This function should be called while holding the capture lock.
41 void Initialize(int sample_rate_hz); 41 void Initialize();
42 42
43 // Reads render side data that has been queued on the render call. 43 // Reads render side data that has been queued on the render call.
44 // This function should be called while holding the capture lock. 44 // This function should be called while holding the capture lock.
45 void ReadQueuedRenderData(); 45 void ReadQueuedRenderData();
46 46
47 // This function should be called while holding the capture lock. 47 // This function should be called while holding the capture lock.
48 float get_echo_likelihood() const; 48 float get_echo_likelihood() const;
49 49
50 private: 50 private:
51 mutable std::vector<float> render_queue_buffer_; 51 mutable std::vector<float> render_queue_buffer_;
52 std::vector<float> capture_queue_buffer_; 52 std::vector<float> capture_queue_buffer_;
53 53
54 // Lock protection not needed. 54 // Lock protection not needed.
55 mutable std::unique_ptr< 55 mutable std::unique_ptr<
56 SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> 56 SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>>
57 render_signal_queue_; 57 render_signal_queue_;
58 58
59 std::unique_ptr<EchoDetector> detector_; 59 std::unique_ptr<EchoDetector> detector_;
60 }; 60 };
61 61
62 } // namespace webrtc 62 } // namespace webrtc
63 63
64 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_ 64 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_RESIDUAL_ECHO_DETECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698