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

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

Issue 1454683002: Fixed the render queue item size preallocation and verification, moved constant declarations, remov… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with latest changes in master Created 5 years, 1 month 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
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/echo_cancellation_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 30 matching lines...) Expand all
41 int Initialize() override; 41 int Initialize() override;
42 void SetExtraOptions(const Config& config) override; 42 void SetExtraOptions(const Config& config) override;
43 43
44 bool is_delay_agnostic_enabled() const; 44 bool is_delay_agnostic_enabled() const;
45 bool is_extended_filter_enabled() const; 45 bool is_extended_filter_enabled() const;
46 46
47 // Reads render side data that has been queued on the render call. 47 // Reads render side data that has been queued on the render call.
48 void ReadQueuedRenderData(); 48 void ReadQueuedRenderData();
49 49
50 private: 50 private:
51 static const size_t kAllowedValuesOfSamplesPerFrame1 = 80;
52 static const size_t kAllowedValuesOfSamplesPerFrame2 = 160;
53 // TODO(peah): Decrease this once we properly handle hugely unbalanced
54 // reverse and forward call numbers.
55 static const size_t kMaxNumFramesToBuffer = 100;
56
57 // EchoCancellation implementation. 51 // EchoCancellation implementation.
58 int Enable(bool enable) override; 52 int Enable(bool enable) override;
59 int enable_drift_compensation(bool enable) override; 53 int enable_drift_compensation(bool enable) override;
60 void set_stream_drift_samples(int drift) override; 54 void set_stream_drift_samples(int drift) override;
61 int set_suppression_level(SuppressionLevel level) override; 55 int set_suppression_level(SuppressionLevel level) override;
62 int enable_metrics(bool enable) override; 56 int enable_metrics(bool enable) override;
63 bool are_metrics_enabled() const override; 57 bool are_metrics_enabled() const override;
64 bool stream_has_echo() const override; 58 bool stream_has_echo() const override;
65 int GetMetrics(Metrics* metrics) override; 59 int GetMetrics(Metrics* metrics) override;
66 int enable_delay_logging(bool enable) override; 60 int enable_delay_logging(bool enable) override;
(...skipping 29 matching lines...) Expand all
96 size_t render_queue_element_max_size_; 90 size_t render_queue_element_max_size_;
97 std::vector<float> render_queue_buffer_; 91 std::vector<float> render_queue_buffer_;
98 std::vector<float> capture_queue_buffer_; 92 std::vector<float> capture_queue_buffer_;
99 rtc::scoped_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> 93 rtc::scoped_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>>
100 render_signal_queue_; 94 render_signal_queue_;
101 }; 95 };
102 96
103 } // namespace webrtc 97 } // namespace webrtc
104 98
105 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ 99 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/echo_cancellation_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698