OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 int16_t compressionGaindB; // default 9 dB | 43 int16_t compressionGaindB; // default 9 dB |
44 uint8_t limiterEnable; // default kAgcTrue (on) | 44 uint8_t limiterEnable; // default kAgcTrue (on) |
45 } WebRtcAgcConfig; | 45 } WebRtcAgcConfig; |
46 | 46 |
47 #if defined(__cplusplus) | 47 #if defined(__cplusplus) |
48 extern "C" | 48 extern "C" |
49 { | 49 { |
50 #endif | 50 #endif |
51 | 51 |
52 /* | 52 /* |
| 53 * This function analyses the number of samples passed to |
| 54 * farend and produces any error code that could arise. |
| 55 * |
| 56 * Input: |
| 57 * - agcInst : AGC instance. |
| 58 * - samples : Number of samples in input vector. |
| 59 * |
| 60 * Return value: |
| 61 * : 0 - Normal operation. |
| 62 * : -1 - Error. |
| 63 */ |
| 64 int WebRtcAgc_GetAddFarendError(void* state, size_t samples); |
| 65 |
| 66 /* |
53 * This function processes a 10 ms frame of far-end speech to determine | 67 * This function processes a 10 ms frame of far-end speech to determine |
54 * if there is active speech. The length of the input speech vector must be | 68 * if there is active speech. The length of the input speech vector must be |
55 * given in samples (80 when FS=8000, and 160 when FS=16000, FS=32000 or | 69 * given in samples (80 when FS=8000, and 160 when FS=16000, FS=32000 or |
56 * FS=48000). | 70 * FS=48000). |
57 * | 71 * |
58 * Input: | 72 * Input: |
59 * - agcInst : AGC instance. | 73 * - agcInst : AGC instance. |
60 * - inFar : Far-end input speech vector | 74 * - inFar : Far-end input speech vector |
61 * - samples : Number of samples in input vector | 75 * - samples : Number of samples in input vector |
62 * | 76 * |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 int32_t minLevel, | 247 int32_t minLevel, |
234 int32_t maxLevel, | 248 int32_t maxLevel, |
235 int16_t agcMode, | 249 int16_t agcMode, |
236 uint32_t fs); | 250 uint32_t fs); |
237 | 251 |
238 #if defined(__cplusplus) | 252 #if defined(__cplusplus) |
239 } | 253 } |
240 #endif | 254 #endif |
241 | 255 |
242 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_ | 256 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_LEGACY_GAIN_CONTROL_H_ |
OLD | NEW |