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

Side by Side Diff: webrtc/modules/audio_processing/gain_control_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
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 29 matching lines...) Expand all
40 // GainControl implementation. 40 // GainControl implementation.
41 bool is_enabled() const override; 41 bool is_enabled() const override;
42 int stream_analog_level() override; 42 int stream_analog_level() override;
43 bool is_limiter_enabled() const override; 43 bool is_limiter_enabled() const override;
44 Mode mode() const override; 44 Mode mode() const override;
45 45
46 // Reads render side data that has been queued on the render call. 46 // Reads render side data that has been queued on the render call.
47 void ReadQueuedRenderData(); 47 void ReadQueuedRenderData();
48 48
49 private: 49 private:
50 static const size_t kAllowedValuesOfSamplesPerFrame1 = 80;
51 static const size_t kAllowedValuesOfSamplesPerFrame2 = 160;
52 // TODO(peah): Decrease this once we properly handle hugely unbalanced
53 // reverse and forward call numbers.
54 static const size_t kMaxNumFramesToBuffer = 100;
55
56 // GainControl implementation. 50 // GainControl implementation.
57 int Enable(bool enable) override; 51 int Enable(bool enable) override;
58 int set_stream_analog_level(int level) override; 52 int set_stream_analog_level(int level) override;
59 int set_mode(Mode mode) override; 53 int set_mode(Mode mode) override;
60 int set_target_level_dbfs(int level) override; 54 int set_target_level_dbfs(int level) override;
61 int target_level_dbfs() const override; 55 int target_level_dbfs() const override;
62 int set_compression_gain_db(int gain) override; 56 int set_compression_gain_db(int gain) override;
63 int compression_gain_db() const override; 57 int compression_gain_db() const override;
64 int enable_limiter(bool enable) override; 58 int enable_limiter(bool enable) override;
65 int set_analog_level_limits(int minimum, int maximum) override; 59 int set_analog_level_limits(int minimum, int maximum) override;
(...skipping 27 matching lines...) Expand all
93 size_t render_queue_element_max_size_; 87 size_t render_queue_element_max_size_;
94 std::vector<int16_t> render_queue_buffer_; 88 std::vector<int16_t> render_queue_buffer_;
95 std::vector<int16_t> capture_queue_buffer_; 89 std::vector<int16_t> capture_queue_buffer_;
96 rtc::scoped_ptr< 90 rtc::scoped_ptr<
97 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>> 91 SwapQueue<std::vector<int16_t>, RenderQueueItemVerifier<int16_t>>>
98 render_signal_queue_; 92 render_signal_queue_;
99 }; 93 };
100 } // namespace webrtc 94 } // namespace webrtc
101 95
102 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ 96 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_control_mobile_impl.cc ('k') | webrtc/modules/audio_processing/gain_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698