| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 * Inputs Description | 102 * Inputs Description |
| 103 * ------------------------------------------------------------------- | 103 * ------------------------------------------------------------------- |
| 104 * void* aecInst Pointer to the AEC instance | 104 * void* aecInst Pointer to the AEC instance |
| 105 * const float* farend In buffer containing one frame of | 105 * const float* farend In buffer containing one frame of |
| 106 * farend signal for L band | 106 * farend signal for L band |
| 107 * int16_t nrOfSamples Number of samples in farend buffer | 107 * int16_t nrOfSamples Number of samples in farend buffer |
| 108 * | 108 * |
| 109 * Outputs Description | 109 * Outputs Description |
| 110 * ------------------------------------------------------------------- | 110 * ------------------------------------------------------------------- |
| 111 * int32_t return 0: OK | 111 * int32_t return 0: OK |
| 112 * -1: error | 112 * 12000-12050: error code |
| 113 */ | 113 */ |
| 114 int32_t WebRtcAec_BufferFarend(void* aecInst, | 114 int32_t WebRtcAec_BufferFarend(void* aecInst, |
| 115 const float* farend, | 115 const float* farend, |
| 116 size_t nrOfSamples); | 116 size_t nrOfSamples); |
| 117 | 117 |
| 118 /* | 118 /* |
| 119 * Reports any errors that would arise if buffering a farend buffer |
| 120 * |
| 121 * Inputs Description |
| 122 * ------------------------------------------------------------------- |
| 123 * void* aecInst Pointer to the AEC instance |
| 124 * const float* farend In buffer containing one frame of |
| 125 * farend signal for L band |
| 126 * int16_t nrOfSamples Number of samples in farend buffer |
| 127 * |
| 128 * Outputs Description |
| 129 * ------------------------------------------------------------------- |
| 130 * int32_t return 0: OK |
| 131 * 12000-12050: error code |
| 132 */ |
| 133 int32_t WebRtcAec_GetBufferFarendError(void* aecInst, |
| 134 const float* farend, |
| 135 size_t nrOfSamples); |
| 136 |
| 137 /* |
| 119 * Runs the echo canceller on an 80 or 160 sample blocks of data. | 138 * Runs the echo canceller on an 80 or 160 sample blocks of data. |
| 120 * | 139 * |
| 121 * Inputs Description | 140 * Inputs Description |
| 122 * ------------------------------------------------------------------- | 141 * ------------------------------------------------------------------- |
| 123 * void* aecInst Pointer to the AEC instance | 142 * void* aecInst Pointer to the AEC instance |
| 124 * float* const* nearend In buffer containing one frame of | 143 * float* const* nearend In buffer containing one frame of |
| 125 * nearend+echo signal for each band | 144 * nearend+echo signal for each band |
| 126 * int num_bands Number of bands in nearend buffer | 145 * int num_bands Number of bands in nearend buffer |
| 127 * int16_t nrOfSamples Number of samples in nearend buffer | 146 * int16_t nrOfSamples Number of samples in nearend buffer |
| 128 * int16_t msInSndCardBuf Delay estimate for sound card and | 147 * int16_t msInSndCardBuf Delay estimate for sound card and |
| 129 * system buffers | 148 * system buffers |
| 130 * int16_t skew Difference between number of samples played | 149 * int16_t skew Difference between number of samples played |
| 131 * and recorded at the soundcard (for clock skew | 150 * and recorded at the soundcard (for clock skew |
| 132 * compensation) | 151 * compensation) |
| 133 * | 152 * |
| 134 * Outputs Description | 153 * Outputs Description |
| 135 * ------------------------------------------------------------------- | 154 * ------------------------------------------------------------------- |
| 136 * float* const* out Out buffer, one frame of processed nearend | 155 * float* const* out Out buffer, one frame of processed nearend |
| 137 * for each band | 156 * for each band |
| 138 * int32_t return 0: OK | 157 * int32_t return 0: OK |
| 139 * -1: error | 158 * 12000-12050: error code |
| 140 */ | 159 */ |
| 141 int32_t WebRtcAec_Process(void* aecInst, | 160 int32_t WebRtcAec_Process(void* aecInst, |
| 142 const float* const* nearend, | 161 const float* const* nearend, |
| 143 size_t num_bands, | 162 size_t num_bands, |
| 144 float* const* out, | 163 float* const* out, |
| 145 size_t nrOfSamples, | 164 size_t nrOfSamples, |
| 146 int16_t msInSndCardBuf, | 165 int16_t msInSndCardBuf, |
| 147 int32_t skew); | 166 int32_t skew); |
| 148 | 167 |
| 149 /* | 168 /* |
| 150 * This function enables the user to set certain parameters on-the-fly. | 169 * This function enables the user to set certain parameters on-the-fly. |
| 151 * | 170 * |
| 152 * Inputs Description | 171 * Inputs Description |
| 153 * ------------------------------------------------------------------- | 172 * ------------------------------------------------------------------- |
| 154 * void* handle Pointer to the AEC instance | 173 * void* handle Pointer to the AEC instance |
| 155 * AecConfig config Config instance that contains all | 174 * AecConfig config Config instance that contains all |
| 156 * properties to be set | 175 * properties to be set |
| 157 * | 176 * |
| 158 * Outputs Description | 177 * Outputs Description |
| 159 * ------------------------------------------------------------------- | 178 * ------------------------------------------------------------------- |
| 160 * int return 0: OK | 179 * int return 0: OK |
| 161 * -1: error | 180 * 12000-12050: error code |
| 162 */ | 181 */ |
| 163 int WebRtcAec_set_config(void* handle, AecConfig config); | 182 int WebRtcAec_set_config(void* handle, AecConfig config); |
| 164 | 183 |
| 165 /* | 184 /* |
| 166 * Gets the current echo status of the nearend signal. | 185 * Gets the current echo status of the nearend signal. |
| 167 * | 186 * |
| 168 * Inputs Description | 187 * Inputs Description |
| 169 * ------------------------------------------------------------------- | 188 * ------------------------------------------------------------------- |
| 170 * void* handle Pointer to the AEC instance | 189 * void* handle Pointer to the AEC instance |
| 171 * | 190 * |
| 172 * Outputs Description | 191 * Outputs Description |
| 173 * ------------------------------------------------------------------- | 192 * ------------------------------------------------------------------- |
| 174 * int* status 0: Almost certainly nearend single-talk | 193 * int* status 0: Almost certainly nearend single-talk |
| 175 * 1: Might not be neared single-talk | 194 * 1: Might not be neared single-talk |
| 176 * int return 0: OK | 195 * int return 0: OK |
| 177 * -1: error | 196 * 12000-12050: error code |
| 178 */ | 197 */ |
| 179 int WebRtcAec_get_echo_status(void* handle, int* status); | 198 int WebRtcAec_get_echo_status(void* handle, int* status); |
| 180 | 199 |
| 181 /* | 200 /* |
| 182 * Gets the current echo metrics for the session. | 201 * Gets the current echo metrics for the session. |
| 183 * | 202 * |
| 184 * Inputs Description | 203 * Inputs Description |
| 185 * ------------------------------------------------------------------- | 204 * ------------------------------------------------------------------- |
| 186 * void* handle Pointer to the AEC instance | 205 * void* handle Pointer to the AEC instance |
| 187 * | 206 * |
| 188 * Outputs Description | 207 * Outputs Description |
| 189 * ------------------------------------------------------------------- | 208 * ------------------------------------------------------------------- |
| 190 * AecMetrics* metrics Struct which will be filled out with the | 209 * AecMetrics* metrics Struct which will be filled out with the |
| 191 * current echo metrics. | 210 * current echo metrics. |
| 192 * int return 0: OK | 211 * int return 0: OK |
| 193 * -1: error | 212 * 12000-12050: error code |
| 194 */ | 213 */ |
| 195 int WebRtcAec_GetMetrics(void* handle, AecMetrics* metrics); | 214 int WebRtcAec_GetMetrics(void* handle, AecMetrics* metrics); |
| 196 | 215 |
| 197 /* | 216 /* |
| 198 * Gets the current delay metrics for the session. | 217 * Gets the current delay metrics for the session. |
| 199 * | 218 * |
| 200 * Inputs Description | 219 * Inputs Description |
| 201 * ------------------------------------------------------------------- | 220 * ------------------------------------------------------------------- |
| 202 * void* handle Pointer to the AEC instance | 221 * void* handle Pointer to the AEC instance |
| 203 * | 222 * |
| 204 * Outputs Description | 223 * Outputs Description |
| 205 * ------------------------------------------------------------------- | 224 * ------------------------------------------------------------------- |
| 206 * int* median Delay median value. | 225 * int* median Delay median value. |
| 207 * int* std Delay standard deviation. | 226 * int* std Delay standard deviation. |
| 208 * float* fraction_poor_delays Fraction of the delay estimates that may | 227 * float* fraction_poor_delays Fraction of the delay estimates that may |
| 209 * cause the AEC to perform poorly. | 228 * cause the AEC to perform poorly. |
| 210 * | 229 * |
| 211 * int return 0: OK | 230 * int return 0: OK |
| 212 * -1: error | 231 * 12000-12050: error code |
| 213 */ | 232 */ |
| 214 int WebRtcAec_GetDelayMetrics(void* handle, | 233 int WebRtcAec_GetDelayMetrics(void* handle, |
| 215 int* median, | 234 int* median, |
| 216 int* std, | 235 int* std, |
| 217 float* fraction_poor_delays); | 236 float* fraction_poor_delays); |
| 218 | 237 |
| 219 /* | |
| 220 * Gets the last error code. | |
| 221 * | |
| 222 * Inputs Description | |
| 223 * ------------------------------------------------------------------- | |
| 224 * void* aecInst Pointer to the AEC instance | |
| 225 * | |
| 226 * Outputs Description | |
| 227 * ------------------------------------------------------------------- | |
| 228 * int32_t return 11000-11100: error code | |
| 229 */ | |
| 230 int32_t WebRtcAec_get_error_code(void* aecInst); | |
| 231 | |
| 232 // Returns a pointer to the low level AEC handle. | 238 // Returns a pointer to the low level AEC handle. |
| 233 // | 239 // |
| 234 // Input: | 240 // Input: |
| 235 // - handle : Pointer to the AEC instance. | 241 // - handle : Pointer to the AEC instance. |
| 236 // | 242 // |
| 237 // Return value: | 243 // Return value: |
| 238 // - AecCore pointer : NULL for error. | 244 // - AecCore pointer : NULL for error. |
| 239 // | 245 // |
| 240 struct AecCore* WebRtcAec_aec_core(void* handle); | 246 struct AecCore* WebRtcAec_aec_core(void* handle); |
| 241 | 247 |
| 242 #ifdef __cplusplus | 248 #ifdef __cplusplus |
| 243 } | 249 } |
| 244 #endif | 250 #endif |
| 245 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ | 251 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ |
| OLD | NEW |