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

Side by Side Diff: webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.cc

Issue 2337083002: Reland of added functionality for specifying the initial signal level to use for the gain estimation (Closed)
Patch Set: Fixed type conversion error 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
« no previous file with comments | « webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc ('k') | no next file » | 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) 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
11 #include "webrtc/modules/audio_processing/level_controller/saturating_gain_estim ator.h" 11 #include "webrtc/modules/audio_processing/level_controller/saturating_gain_estim ator.h"
12 12
13 #include <math.h> 13 #include <math.h>
14 #include <algorithm> 14 #include <algorithm>
15 15
16 #include "webrtc/modules/audio_processing/level_controller/lc_constants.h" 16 #include "webrtc/modules/audio_processing/level_controller/level_controller_cons tants.h"
17 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" 17 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 20
21 SaturatingGainEstimator::SaturatingGainEstimator() { 21 SaturatingGainEstimator::SaturatingGainEstimator() {
22 Initialize(); 22 Initialize();
23 } 23 }
24 24
25 SaturatingGainEstimator::~SaturatingGainEstimator() {} 25 SaturatingGainEstimator::~SaturatingGainEstimator() {}
26 26
(...skipping 12 matching lines...) Expand all
39 saturating_gain_hold_counter_ = 39 saturating_gain_hold_counter_ =
40 std::max(0, saturating_gain_hold_counter_ - 1); 40 std::max(0, saturating_gain_hold_counter_ - 1);
41 if (saturating_gain_hold_counter_ == 0) { 41 if (saturating_gain_hold_counter_ == 0) {
42 saturating_gain_ *= 1.001f; 42 saturating_gain_ *= 1.001f;
43 saturating_gain_ = std::min(kMaxLcGain, saturating_gain_); 43 saturating_gain_ = std::min(kMaxLcGain, saturating_gain_);
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 } // namespace webrtc 48 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/level_controller/peak_level_estimator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698