blob: 2aca9996f9ccdab49751c5710b212add9f6d9908 [file] [log] [blame]
pbos@webrtc.org788acd12014-12-15 09:41:24 +00001/*
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.orga33f05e2015-01-29 14:29:45 +000011#ifndef WEBRTC_TOOLS_AGC_TEST_UTILS_H_
12#define WEBRTC_TOOLS_AGC_TEST_UTILS_H_
pbos@webrtc.org788acd12014-12-15 09:41:24 +000013namespace webrtc {
14
15class AudioFrame;
16
17float MicLevel2Gain(int gain_range_db, int level);
18float Db2Linear(float db);
19void ApplyGainLinear(float gain, float last_gain, AudioFrame* frame);
20void ApplyGain(float gain_db, float last_gain_db, AudioFrame* frame);
21void SimulateMic(int gain_range_db, int mic_level, int last_mic_level,
22 AudioFrame* frame);
23void SimulateMic(int gain_map[255], int mic_level, int last_mic_level,
24 AudioFrame* frame);
25
26} // namespace webrtc
27
kjellander@webrtc.orga33f05e2015-01-29 14:29:45 +000028#endif // WEBRTC_TOOLS_AGC_TEST_UTILS_H_