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

Side by Side Diff: webrtc/tools/agc/test_utils.cc

Issue 1417683006: modules: more interface -> include renames (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix last incorrectly wrapped pragma message 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 | « webrtc/tools/agc/activity_metric.cc ('k') | webrtc/video/rampup_tests.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
11 #include "webrtc/tools/agc/test_utils.h" 11 #include "webrtc/tools/agc/test_utils.h"
12 12
13 #include <cmath> 13 #include <cmath>
14 14
15 #include <algorithm> 15 #include <algorithm>
16 16
17 #include "webrtc/modules/interface/module_common_types.h" 17 #include "webrtc/modules/include/module_common_types.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 20
21 float MicLevel2Gain(int gain_range_db, int level) { 21 float MicLevel2Gain(int gain_range_db, int level) {
22 return (level - 127.0f) / 128.0f * gain_range_db / 2; 22 return (level - 127.0f) / 128.0f * gain_range_db / 2;
23 } 23 }
24 24
25 float Db2Linear(float db) { 25 float Db2Linear(float db) {
26 return powf(10.0f, db / 20.0f); 26 return powf(10.0f, db / 20.0f);
27 } 27 }
(...skipping 27 matching lines...) Expand all
55 55
56 void SimulateMic(int gain_map[255], int mic_level, int last_mic_level, 56 void SimulateMic(int gain_map[255], int mic_level, int last_mic_level,
57 AudioFrame* frame) { 57 AudioFrame* frame) {
58 assert(mic_level >= 0 && mic_level <= 255); 58 assert(mic_level >= 0 && mic_level <= 255);
59 assert(last_mic_level >= 0 && last_mic_level <= 255); 59 assert(last_mic_level >= 0 && last_mic_level <= 255);
60 ApplyGain(gain_map[mic_level], gain_map[last_mic_level], frame); 60 ApplyGain(gain_map[mic_level], gain_map[last_mic_level], frame);
61 } 61 }
62 62
63 } // namespace webrtc 63 } // namespace webrtc
64 64
OLDNEW
« no previous file with comments | « webrtc/tools/agc/activity_metric.cc ('k') | webrtc/video/rampup_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698