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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 | 264 |
265 return 0; | 265 return 0; |
266 } | 266 } |
267 | 267 |
268 // only buffer L band for farend | 268 // only buffer L band for farend |
269 int32_t WebRtcAec_BufferFarend(void* aecInst, | 269 int32_t WebRtcAec_BufferFarend(void* aecInst, |
270 const float* farend, | 270 const float* farend, |
271 int16_t nrOfSamples) { | 271 int16_t nrOfSamples) { |
272 Aec* aecpc = aecInst; | 272 Aec* aecpc = aecInst; |
273 int newNrOfSamples = (int)nrOfSamples; | 273 int newNrOfSamples = nrOfSamples; |
274 float new_farend[MAX_RESAMP_LEN]; | 274 float new_farend[MAX_RESAMP_LEN]; |
275 const float* farend_ptr = farend; | 275 const float* farend_ptr = farend; |
276 | 276 |
277 if (farend == NULL) { | 277 if (farend == NULL) { |
278 aecpc->lastError = AEC_NULL_POINTER_ERROR; | 278 aecpc->lastError = AEC_NULL_POINTER_ERROR; |
279 return -1; | 279 return -1; |
280 } | 280 } |
281 | 281 |
282 if (aecpc->initFlag != initCheck) { | 282 if (aecpc->initFlag != initCheck) { |
283 aecpc->lastError = AEC_UNINITIALIZED_ERROR; | 283 aecpc->lastError = AEC_UNINITIALIZED_ERROR; |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 } | 914 } |
915 } else { | 915 } else { |
916 self->timeForDelayChange = 0; | 916 self->timeForDelayChange = 0; |
917 } | 917 } |
918 self->lastDelayDiff = delay_difference; | 918 self->lastDelayDiff = delay_difference; |
919 | 919 |
920 if (self->timeForDelayChange > 25) { | 920 if (self->timeForDelayChange > 25) { |
921 self->knownDelay = WEBRTC_SPL_MAX((int)self->filtDelay - 256, 0); | 921 self->knownDelay = WEBRTC_SPL_MAX((int)self->filtDelay - 256, 0); |
922 } | 922 } |
923 } | 923 } |
OLD | NEW |