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

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

Issue 2285713002: Fix Chromium clang plugin warnings (Closed)
Patch Set: Created 4 years, 3 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) 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // TODO(turajs): just some arbitrary sanity check. We can come up with better 90 // TODO(turajs): just some arbitrary sanity check. We can come up with better
91 // limits. The upper limit should be chosen such that the risk of clipping is 91 // limits. The upper limit should be chosen such that the risk of clipping is
92 // low. The lower limit should not result in a too quiet signal. 92 // low. The lower limit should not result in a too quiet signal.
93 if (level >= 0 || level <= -100) 93 if (level >= 0 || level <= -100)
94 return -1; 94 return -1;
95 target_level_dbfs_ = level; 95 target_level_dbfs_ = level;
96 target_level_loudness_ = Dbfs2Loudness(level); 96 target_level_loudness_ = Dbfs2Loudness(level);
97 return 0; 97 return 0;
98 } 98 }
99 99
100 int Agc::target_level_dbfs() const {
101 return target_level_dbfs_;
102 }
103
104 float Agc::voice_probability() const {
105 return vad_.last_voice_probability();
106 }
107
100 } // namespace webrtc 108 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/agc/agc.h ('k') | webrtc/modules/audio_processing/vad/voice_activity_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698