| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 * Initializes an AECM instance. | 59 * Initializes an AECM instance. |
| 60 * | 60 * |
| 61 * Inputs Description | 61 * Inputs Description |
| 62 * ------------------------------------------------------------------- | 62 * ------------------------------------------------------------------- |
| 63 * void* aecmInst Pointer to the AECM instance | 63 * void* aecmInst Pointer to the AECM instance |
| 64 * int32_t sampFreq Sampling frequency of data | 64 * int32_t sampFreq Sampling frequency of data |
| 65 * | 65 * |
| 66 * Outputs Description | 66 * Outputs Description |
| 67 * ------------------------------------------------------------------- | 67 * ------------------------------------------------------------------- |
| 68 * int32_t return 0: OK | 68 * int32_t return 0: OK |
| 69 * -1: error | 69 * 1200-12004,12100: error/warning |
| 70 */ | 70 */ |
| 71 int32_t WebRtcAecm_Init(void* aecmInst, int32_t sampFreq); | 71 int32_t WebRtcAecm_Init(void* aecmInst, int32_t sampFreq); |
| 72 | 72 |
| 73 /* | 73 /* |
| 74 * Inserts an 80 or 160 sample block of data into the farend buffer. | 74 * Inserts an 80 or 160 sample block of data into the farend buffer. |
| 75 * | 75 * |
| 76 * Inputs Description | 76 * Inputs Description |
| 77 * ------------------------------------------------------------------- | 77 * ------------------------------------------------------------------- |
| 78 * void* aecmInst Pointer to the AECM instance | 78 * void* aecmInst Pointer to the AECM instance |
| 79 * int16_t* farend In buffer containing one frame of | 79 * int16_t* farend In buffer containing one frame of |
| 80 * farend signal | 80 * farend signal |
| 81 * int16_t nrOfSamples Number of samples in farend buffer | 81 * int16_t nrOfSamples Number of samples in farend buffer |
| 82 * | 82 * |
| 83 * Outputs Description | 83 * Outputs Description |
| 84 * ------------------------------------------------------------------- | 84 * ------------------------------------------------------------------- |
| 85 * int32_t return 0: OK | 85 * int32_t return 0: OK |
| 86 * -1: error | 86 * 1200-12004,12100: error/warning |
| 87 */ | 87 */ |
| 88 int32_t WebRtcAecm_BufferFarend(void* aecmInst, | 88 int32_t WebRtcAecm_BufferFarend(void* aecmInst, |
| 89 const int16_t* farend, | 89 const int16_t* farend, |
| 90 size_t nrOfSamples); | 90 size_t nrOfSamples); |
| 91 | 91 |
| 92 /* | 92 /* |
| 93 * Reports any errors that would arise when buffering a farend buffer. |
| 94 * |
| 95 * Inputs Description |
| 96 * ------------------------------------------------------------------- |
| 97 * void* aecmInst Pointer to the AECM instance |
| 98 * int16_t* farend In buffer containing one frame of |
| 99 * farend signal |
| 100 * int16_t nrOfSamples Number of samples in farend buffer |
| 101 * |
| 102 * Outputs Description |
| 103 * ------------------------------------------------------------------- |
| 104 * int32_t return 0: OK |
| 105 * 1200-12004,12100: error/warning |
| 106 */ |
| 107 int32_t WebRtcAecm_GetBufferFarendError(void* aecmInst, |
| 108 const int16_t* farend, |
| 109 size_t nrOfSamples); |
| 110 |
| 111 /* |
| 93 * Runs the AECM on an 80 or 160 sample blocks of data. | 112 * Runs the AECM on an 80 or 160 sample blocks of data. |
| 94 * | 113 * |
| 95 * Inputs Description | 114 * Inputs Description |
| 96 * ------------------------------------------------------------------- | 115 * ------------------------------------------------------------------- |
| 97 * void* aecmInst Pointer to the AECM instance | 116 * void* aecmInst Pointer to the AECM instance |
| 98 * int16_t* nearendNoisy In buffer containing one frame of | 117 * int16_t* nearendNoisy In buffer containing one frame of |
| 99 * reference nearend+echo signal. If | 118 * reference nearend+echo signal. If |
| 100 * noise reduction is active, provide | 119 * noise reduction is active, provide |
| 101 * the noisy signal here. | 120 * the noisy signal here. |
| 102 * int16_t* nearendClean In buffer containing one frame of | 121 * int16_t* nearendClean In buffer containing one frame of |
| 103 * nearend+echo signal. If noise | 122 * nearend+echo signal. If noise |
| 104 * reduction is active, provide the | 123 * reduction is active, provide the |
| 105 * clean signal here. Otherwise pass a | 124 * clean signal here. Otherwise pass a |
| 106 * NULL pointer. | 125 * NULL pointer. |
| 107 * int16_t nrOfSamples Number of samples in nearend buffer | 126 * int16_t nrOfSamples Number of samples in nearend buffer |
| 108 * int16_t msInSndCardBuf Delay estimate for sound card and | 127 * int16_t msInSndCardBuf Delay estimate for sound card and |
| 109 * system buffers | 128 * system buffers |
| 110 * | 129 * |
| 111 * Outputs Description | 130 * Outputs Description |
| 112 * ------------------------------------------------------------------- | 131 * ------------------------------------------------------------------- |
| 113 * int16_t* out Out buffer, one frame of processed nearend | 132 * int16_t* out Out buffer, one frame of processed nearend |
| 114 * int32_t return 0: OK | 133 * int32_t return 0: OK |
| 115 * -1: error | 134 * 1200-12004,12100: error/warning |
| 116 */ | 135 */ |
| 117 int32_t WebRtcAecm_Process(void* aecmInst, | 136 int32_t WebRtcAecm_Process(void* aecmInst, |
| 118 const int16_t* nearendNoisy, | 137 const int16_t* nearendNoisy, |
| 119 const int16_t* nearendClean, | 138 const int16_t* nearendClean, |
| 120 int16_t* out, | 139 int16_t* out, |
| 121 size_t nrOfSamples, | 140 size_t nrOfSamples, |
| 122 int16_t msInSndCardBuf); | 141 int16_t msInSndCardBuf); |
| 123 | 142 |
| 124 /* | 143 /* |
| 125 * This function enables the user to set certain parameters on-the-fly | 144 * This function enables the user to set certain parameters on-the-fly |
| 126 * | 145 * |
| 127 * Inputs Description | 146 * Inputs Description |
| 128 * ------------------------------------------------------------------- | 147 * ------------------------------------------------------------------- |
| 129 * void* aecmInst Pointer to the AECM instance | 148 * void* aecmInst Pointer to the AECM instance |
| 130 * AecmConfig config Config instance that contains all | 149 * AecmConfig config Config instance that contains all |
| 131 * properties to be set | 150 * properties to be set |
| 132 * | 151 * |
| 133 * Outputs Description | 152 * Outputs Description |
| 134 * ------------------------------------------------------------------- | 153 * ------------------------------------------------------------------- |
| 135 * int32_t return 0: OK | 154 * int32_t return 0: OK |
| 136 * -1: error | 155 * 1200-12004,12100: error/warning |
| 137 */ | 156 */ |
| 138 int32_t WebRtcAecm_set_config(void* aecmInst, AecmConfig config); | 157 int32_t WebRtcAecm_set_config(void* aecmInst, AecmConfig config); |
| 139 | 158 |
| 140 /* | 159 /* |
| 141 * This function enables the user to set certain parameters on-the-fly | |
| 142 * | |
| 143 * Inputs Description | |
| 144 * ------------------------------------------------------------------- | |
| 145 * void* aecmInst Pointer to the AECM instance | |
| 146 * | |
| 147 * Outputs Description | |
| 148 * ------------------------------------------------------------------- | |
| 149 * AecmConfig* config Pointer to the config instance that | |
| 150 * all properties will be written to | |
| 151 * int32_t return 0: OK | |
| 152 * -1: error | |
| 153 */ | |
| 154 int32_t WebRtcAecm_get_config(void *aecmInst, AecmConfig *config); | |
| 155 | |
| 156 /* | |
| 157 * This function enables the user to set the echo path on-the-fly. | 160 * This function enables the user to set the echo path on-the-fly. |
| 158 * | 161 * |
| 159 * Inputs Description | 162 * Inputs Description |
| 160 * ------------------------------------------------------------------- | 163 * ------------------------------------------------------------------- |
| 161 * void* aecmInst Pointer to the AECM instance | 164 * void* aecmInst Pointer to the AECM instance |
| 162 * void* echo_path Pointer to the echo path to be set | 165 * void* echo_path Pointer to the echo path to be set |
| 163 * size_t size_bytes Size in bytes of the echo path | 166 * size_t size_bytes Size in bytes of the echo path |
| 164 * | 167 * |
| 165 * Outputs Description | 168 * Outputs Description |
| 166 * ------------------------------------------------------------------- | 169 * ------------------------------------------------------------------- |
| 167 * int32_t return 0: OK | 170 * int32_t return 0: OK |
| 168 * -1: error | 171 * 1200-12004,12100: error/warning |
| 169 */ | 172 */ |
| 170 int32_t WebRtcAecm_InitEchoPath(void* aecmInst, | 173 int32_t WebRtcAecm_InitEchoPath(void* aecmInst, |
| 171 const void* echo_path, | 174 const void* echo_path, |
| 172 size_t size_bytes); | 175 size_t size_bytes); |
| 173 | 176 |
| 174 /* | 177 /* |
| 175 * This function enables the user to get the currently used echo path | 178 * This function enables the user to get the currently used echo path |
| 176 * on-the-fly | 179 * on-the-fly |
| 177 * | 180 * |
| 178 * Inputs Description | 181 * Inputs Description |
| 179 * ------------------------------------------------------------------- | 182 * ------------------------------------------------------------------- |
| 180 * void* aecmInst Pointer to the AECM instance | 183 * void* aecmInst Pointer to the AECM instance |
| 181 * void* echo_path Pointer to echo path | 184 * void* echo_path Pointer to echo path |
| 182 * size_t size_bytes Size in bytes of the echo path | 185 * size_t size_bytes Size in bytes of the echo path |
| 183 * | 186 * |
| 184 * Outputs Description | 187 * Outputs Description |
| 185 * ------------------------------------------------------------------- | 188 * ------------------------------------------------------------------- |
| 186 * int32_t return 0: OK | 189 * int32_t return 0: OK |
| 187 * -1: error | 190 * 1200-12004,12100: error/warning |
| 188 */ | 191 */ |
| 189 int32_t WebRtcAecm_GetEchoPath(void* aecmInst, | 192 int32_t WebRtcAecm_GetEchoPath(void* aecmInst, |
| 190 void* echo_path, | 193 void* echo_path, |
| 191 size_t size_bytes); | 194 size_t size_bytes); |
| 192 | 195 |
| 193 /* | 196 /* |
| 194 * This function enables the user to get the echo path size in bytes | 197 * This function enables the user to get the echo path size in bytes |
| 195 * | 198 * |
| 196 * Outputs Description | 199 * Outputs Description |
| 197 * ------------------------------------------------------------------- | 200 * ------------------------------------------------------------------- |
| 198 * size_t return Size in bytes | 201 * size_t return Size in bytes |
| 199 */ | 202 */ |
| 200 size_t WebRtcAecm_echo_path_size_bytes(); | 203 size_t WebRtcAecm_echo_path_size_bytes(); |
| 201 | 204 |
| 202 /* | |
| 203 * Gets the last error code. | |
| 204 * | |
| 205 * Inputs Description | |
| 206 * ------------------------------------------------------------------- | |
| 207 * void* aecmInst Pointer to the AECM instance | |
| 208 * | |
| 209 * Outputs Description | |
| 210 * ------------------------------------------------------------------- | |
| 211 * int32_t return 11000-11100: error code | |
| 212 */ | |
| 213 int32_t WebRtcAecm_get_error_code(void *aecmInst); | |
| 214 | 205 |
| 215 #ifdef __cplusplus | 206 #ifdef __cplusplus |
| 216 } | 207 } |
| 217 #endif | 208 #endif |
| 218 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AECM_INCLUDE_ECHO_CONTROL_MOBILE_H_ | 209 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AECM_INCLUDE_ECHO_CONTROL_MOBILE_H_ |
| OLD | NEW |