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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 * - interval : generate SID data every interval ms | 61 * - interval : generate SID data every interval ms |
62 * - quality : Number of refl. coefs, maximum allowed is 12 | 62 * - quality : Number of refl. coefs, maximum allowed is 12 |
63 * | 63 * |
64 * Output: | 64 * Output: |
65 * - cng_inst : Initialized instance | 65 * - cng_inst : Initialized instance |
66 * | 66 * |
67 * Return value : 0 - Ok | 67 * Return value : 0 - Ok |
68 * -1 - Error | 68 * -1 - Error |
69 */ | 69 */ |
70 | 70 |
71 int16_t WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, uint16_t fs, int16_t interval, | 71 int WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, int fs, int16_t interval, |
72 int16_t quality); | 72 int16_t quality); |
73 int16_t WebRtcCng_InitDec(CNG_dec_inst* cng_inst); | 73 int16_t WebRtcCng_InitDec(CNG_dec_inst* cng_inst); |
74 | 74 |
75 /**************************************************************************** | 75 /**************************************************************************** |
76 * WebRtcCng_FreeEnc/Dec(...) | 76 * WebRtcCng_FreeEnc/Dec(...) |
77 * | 77 * |
78 * These functions frees the dynamic memory of a specified instance | 78 * These functions frees the dynamic memory of a specified instance |
79 * | 79 * |
80 * Input: | 80 * Input: |
81 * - cng_inst : Pointer to created instance that should be freed | 81 * - cng_inst : Pointer to created instance that should be freed |
82 * | 82 * |
(...skipping 13 matching lines...) Expand all Loading... |
96 * - speech : Signal to be analyzed | 96 * - speech : Signal to be analyzed |
97 * - nrOfSamples : Size of speech vector | 97 * - nrOfSamples : Size of speech vector |
98 * - forceSID : not zero to force SID frame and reset | 98 * - forceSID : not zero to force SID frame and reset |
99 * | 99 * |
100 * Output: | 100 * Output: |
101 * - bytesOut : Nr of bytes to transmit, might be 0 | 101 * - bytesOut : Nr of bytes to transmit, might be 0 |
102 * | 102 * |
103 * Return value : 0 - Ok | 103 * Return value : 0 - Ok |
104 * -1 - Error | 104 * -1 - Error |
105 */ | 105 */ |
106 int16_t WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, | 106 int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, |
107 int16_t nrOfSamples, uint8_t* SIDdata, | 107 int16_t nrOfSamples, uint8_t* SIDdata, |
108 int16_t* bytesOut, int16_t forceSID); | 108 int16_t* bytesOut, int16_t forceSID); |
109 | 109 |
110 /**************************************************************************** | 110 /**************************************************************************** |
111 * WebRtcCng_UpdateSid(...) | 111 * WebRtcCng_UpdateSid(...) |
112 * | 112 * |
113 * These functions updates the CN state, when a new SID packet arrives | 113 * These functions updates the CN state, when a new SID packet arrives |
114 * | 114 * |
115 * Input: | 115 * Input: |
116 * - cng_inst : Pointer to created instance that should be freed | 116 * - cng_inst : Pointer to created instance that should be freed |
117 * - SID : SID packet, all headers removed | 117 * - SID : SID packet, all headers removed |
118 * - length : Length in bytes of SID packet | 118 * - length : Length in bytes of SID packet |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 * Return value : Error code | 154 * Return value : Error code |
155 */ | 155 */ |
156 int16_t WebRtcCng_GetErrorCodeEnc(CNG_enc_inst* cng_inst); | 156 int16_t WebRtcCng_GetErrorCodeEnc(CNG_enc_inst* cng_inst); |
157 int16_t WebRtcCng_GetErrorCodeDec(CNG_dec_inst* cng_inst); | 157 int16_t WebRtcCng_GetErrorCodeDec(CNG_dec_inst* cng_inst); |
158 | 158 |
159 #ifdef __cplusplus | 159 #ifdef __cplusplus |
160 } | 160 } |
161 #endif | 161 #endif |
162 | 162 |
163 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_MAIN_INTERFACE_WEBRTC_CNG_H_ | 163 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_MAIN_INTERFACE_WEBRTC_CNG_H_ |
OLD | NEW |