| 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 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ |
| 13 | 13 |
| 14 #include <stddef.h> |
| 15 |
| 14 #include "webrtc/typedefs.h" | 16 #include "webrtc/typedefs.h" |
| 15 | 17 |
| 16 // Errors | 18 // Errors |
| 17 #define AEC_UNSPECIFIED_ERROR 12000 | 19 #define AEC_UNSPECIFIED_ERROR 12000 |
| 18 #define AEC_UNSUPPORTED_FUNCTION_ERROR 12001 | 20 #define AEC_UNSUPPORTED_FUNCTION_ERROR 12001 |
| 19 #define AEC_UNINITIALIZED_ERROR 12002 | 21 #define AEC_UNINITIALIZED_ERROR 12002 |
| 20 #define AEC_NULL_POINTER_ERROR 12003 | 22 #define AEC_NULL_POINTER_ERROR 12003 |
| 21 #define AEC_BAD_PARAMETER_ERROR 12004 | 23 #define AEC_BAD_PARAMETER_ERROR 12004 |
| 22 | 24 |
| 23 // Warnings | 25 // Warnings |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 * farend signal for L band | 106 * farend signal for L band |
| 105 * int16_t nrOfSamples Number of samples in farend buffer | 107 * int16_t nrOfSamples Number of samples in farend buffer |
| 106 * | 108 * |
| 107 * Outputs Description | 109 * Outputs Description |
| 108 * ------------------------------------------------------------------- | 110 * ------------------------------------------------------------------- |
| 109 * int32_t return 0: OK | 111 * int32_t return 0: OK |
| 110 * -1: error | 112 * -1: error |
| 111 */ | 113 */ |
| 112 int32_t WebRtcAec_BufferFarend(void* aecInst, | 114 int32_t WebRtcAec_BufferFarend(void* aecInst, |
| 113 const float* farend, | 115 const float* farend, |
| 114 int16_t nrOfSamples); | 116 size_t nrOfSamples); |
| 115 | 117 |
| 116 /* | 118 /* |
| 117 * Runs the echo canceller on an 80 or 160 sample blocks of data. | 119 * Runs the echo canceller on an 80 or 160 sample blocks of data. |
| 118 * | 120 * |
| 119 * Inputs Description | 121 * Inputs Description |
| 120 * ------------------------------------------------------------------- | 122 * ------------------------------------------------------------------- |
| 121 * void* aecInst Pointer to the AEC instance | 123 * void* aecInst Pointer to the AEC instance |
| 122 * float* const* nearend In buffer containing one frame of | 124 * float* const* nearend In buffer containing one frame of |
| 123 * nearend+echo signal for each band | 125 * nearend+echo signal for each band |
| 124 * int num_bands Number of bands in nearend buffer | 126 * int num_bands Number of bands in nearend buffer |
| 125 * int16_t nrOfSamples Number of samples in nearend buffer | 127 * int16_t nrOfSamples Number of samples in nearend buffer |
| 126 * int16_t msInSndCardBuf Delay estimate for sound card and | 128 * int16_t msInSndCardBuf Delay estimate for sound card and |
| 127 * system buffers | 129 * system buffers |
| 128 * int16_t skew Difference between number of samples played | 130 * int16_t skew Difference between number of samples played |
| 129 * and recorded at the soundcard (for clock skew | 131 * and recorded at the soundcard (for clock skew |
| 130 * compensation) | 132 * compensation) |
| 131 * | 133 * |
| 132 * Outputs Description | 134 * Outputs Description |
| 133 * ------------------------------------------------------------------- | 135 * ------------------------------------------------------------------- |
| 134 * float* const* out Out buffer, one frame of processed nearend | 136 * float* const* out Out buffer, one frame of processed nearend |
| 135 * for each band | 137 * for each band |
| 136 * int32_t return 0: OK | 138 * int32_t return 0: OK |
| 137 * -1: error | 139 * -1: error |
| 138 */ | 140 */ |
| 139 int32_t WebRtcAec_Process(void* aecInst, | 141 int32_t WebRtcAec_Process(void* aecInst, |
| 140 const float* const* nearend, | 142 const float* const* nearend, |
| 141 int num_bands, | 143 size_t num_bands, |
| 142 float* const* out, | 144 float* const* out, |
| 143 int16_t nrOfSamples, | 145 size_t nrOfSamples, |
| 144 int16_t msInSndCardBuf, | 146 int16_t msInSndCardBuf, |
| 145 int32_t skew); | 147 int32_t skew); |
| 146 | 148 |
| 147 /* | 149 /* |
| 148 * This function enables the user to set certain parameters on-the-fly. | 150 * This function enables the user to set certain parameters on-the-fly. |
| 149 * | 151 * |
| 150 * Inputs Description | 152 * Inputs Description |
| 151 * ------------------------------------------------------------------- | 153 * ------------------------------------------------------------------- |
| 152 * void* handle Pointer to the AEC instance | 154 * void* handle Pointer to the AEC instance |
| 153 * AecConfig config Config instance that contains all | 155 * AecConfig config Config instance that contains all |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // | 236 // |
| 235 // Return value: | 237 // Return value: |
| 236 // - AecCore pointer : NULL for error. | 238 // - AecCore pointer : NULL for error. |
| 237 // | 239 // |
| 238 struct AecCore* WebRtcAec_aec_core(void* handle); | 240 struct AecCore* WebRtcAec_aec_core(void* handle); |
| 239 | 241 |
| 240 #ifdef __cplusplus | 242 #ifdef __cplusplus |
| 241 } | 243 } |
| 242 #endif | 244 #endif |
| 243 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ | 245 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ |
| OLD | NEW |