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

Side by Side Diff: webrtc/modules/audio_processing/gain_control_for_new_agc.cc

Issue 1678813002: Moved the GainControlForNewAGC class to a separate file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added macro call to limit copy and assign access Created 4 years, 10 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
(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 #include "webrtc/modules/audio_processing/gain_control_for_new_agc.h"
12 #include "webrtc/modules/audio_processing/gain_control_impl.h"
13 #include "webrtc/modules/audio_processing/include/audio_processing.h"
14
15 namespace webrtc {
16
17 GainControlForNewAgc::GainControlForNewAgc(GainControlImpl* gain_control)
the sun 2016/02/08 09:21:39 Do we have any threading issues here at all?
peah-webrtc 2016/02/08 13:01:12 The way it is currently used, threading and lock i
the sun 2016/02/08 14:18:11 Maybe it's a minor thing, but the volume_ field is
peah-webrtc 2016/02/09 09:11:15 I think you are right. I added a thread checker. T
18 : real_gain_control_(gain_control), volume_(0) {}
19
20 int GainControlForNewAgc::Enable(bool enable) {
21 return real_gain_control_->Enable(enable);
22 }
23
24 bool GainControlForNewAgc::is_enabled() const {
25 return real_gain_control_->is_enabled();
26 }
27
28 int GainControlForNewAgc::set_stream_analog_level(int level) {
29 volume_ = level;
30 return AudioProcessing::kNoError;
31 }
32
33 int GainControlForNewAgc::stream_analog_level() {
34 return volume_;
35 }
36
37 int GainControlForNewAgc::set_mode(Mode mode) {
38 return AudioProcessing::kNoError;
39 }
40
41 GainControl::Mode GainControlForNewAgc::mode() const {
42 return GainControl::kAdaptiveAnalog;
43 }
44
45 int GainControlForNewAgc::set_target_level_dbfs(int level) {
46 return AudioProcessing::kNoError;
47 }
48
49 int GainControlForNewAgc::target_level_dbfs() const {
50 return real_gain_control_->target_level_dbfs();
51 }
52
53 int GainControlForNewAgc::set_compression_gain_db(int gain) {
54 return AudioProcessing::kNoError;
55 }
56
57 int GainControlForNewAgc::compression_gain_db() const {
58 return real_gain_control_->compression_gain_db();
59 }
60
61 int GainControlForNewAgc::enable_limiter(bool enable) {
62 return AudioProcessing::kNoError;
63 }
64
65 bool GainControlForNewAgc::is_limiter_enabled() const {
66 return real_gain_control_->is_limiter_enabled();
67 }
68
69 int GainControlForNewAgc::set_analog_level_limits(int minimum, int maximum) {
70 return AudioProcessing::kNoError;
71 }
72
73 int GainControlForNewAgc::analog_level_minimum() const {
74 return real_gain_control_->analog_level_minimum();
75 }
76
77 int GainControlForNewAgc::analog_level_maximum() const {
78 return real_gain_control_->analog_level_maximum();
79 }
80
81 bool GainControlForNewAgc::stream_is_saturated() const {
82 return real_gain_control_->stream_is_saturated();
83 }
84
85 void GainControlForNewAgc::SetMicVolume(int volume) {
86 volume_ = volume;
87 }
88
89 int GainControlForNewAgc::GetMicVolume() {
90 return volume_;
91 }
92
93 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698