pbos@webrtc.org | 788acd1 | 2014-12-15 09:41:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 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 | |
kjellander@webrtc.org | a33f05e | 2015-01-29 14:29:45 +0000 | [diff] [blame] | 11 | #ifndef WEBRTC_TOOLS_AGC_TEST_UTILS_H_ |
| 12 | #define WEBRTC_TOOLS_AGC_TEST_UTILS_H_ |
pbos@webrtc.org | 788acd1 | 2014-12-15 09:41:24 +0000 | [diff] [blame] | 13 | namespace webrtc { |
| 14 | |
| 15 | class AudioFrame; |
| 16 | |
| 17 | float MicLevel2Gain(int gain_range_db, int level); |
| 18 | float Db2Linear(float db); |
| 19 | void ApplyGainLinear(float gain, float last_gain, AudioFrame* frame); |
| 20 | void ApplyGain(float gain_db, float last_gain_db, AudioFrame* frame); |
| 21 | void SimulateMic(int gain_range_db, int mic_level, int last_mic_level, |
| 22 | AudioFrame* frame); |
| 23 | void SimulateMic(int gain_map[255], int mic_level, int last_mic_level, |
| 24 | AudioFrame* frame); |
| 25 | |
| 26 | } // namespace webrtc |
| 27 | |
kjellander@webrtc.org | a33f05e | 2015-01-29 14:29:45 +0000 | [diff] [blame] | 28 | #endif // WEBRTC_TOOLS_AGC_TEST_UTILS_H_ |