| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_INTERNAL_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_INTERNAL_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 extern "C" { | |
| 17 #include "webrtc/common_audio/ring_buffer.h" | |
| 18 } | |
| 19 #include "webrtc/modules/audio_processing/aec/aec_core.h" | |
| 20 | |
| 21 namespace webrtc { | |
| 22 | |
| 23 class ApmDataDumper; | |
| 24 | |
| 25 typedef struct Aec { | |
| 26 std::unique_ptr<ApmDataDumper> data_dumper; | |
| 27 | |
| 28 int delayCtr; | |
| 29 int sampFreq; | |
| 30 int splitSampFreq; | |
| 31 int scSampFreq; | |
| 32 float sampFactor; // scSampRate / sampFreq | |
| 33 short skewMode; | |
| 34 int bufSizeStart; | |
| 35 int knownDelay; | |
| 36 int rate_factor; | |
| 37 | |
| 38 short initFlag; // indicates if AEC has been initialized | |
| 39 | |
| 40 // Variables used for averaging far end buffer size | |
| 41 short counter; | |
| 42 int sum; | |
| 43 short firstVal; | |
| 44 short checkBufSizeCtr; | |
| 45 | |
| 46 // Variables used for delay shifts | |
| 47 short msInSndCardBuf; | |
| 48 short filtDelay; // Filtered delay estimate. | |
| 49 int timeForDelayChange; | |
| 50 int startup_phase; | |
| 51 int checkBuffSize; | |
| 52 short lastDelayDiff; | |
| 53 | |
| 54 // Structures | |
| 55 void* resampler; | |
| 56 | |
| 57 int skewFrCtr; | |
| 58 int resample; // if the skew is small enough we don't resample | |
| 59 int highSkewCtr; | |
| 60 float skew; | |
| 61 | |
| 62 RingBuffer* far_pre_buf; // Time domain far-end pre-buffer. | |
| 63 | |
| 64 int farend_started; | |
| 65 | |
| 66 // Aec instance counter. | |
| 67 static int instance_count; | |
| 68 AecCore* aec; | |
| 69 } Aec; | |
| 70 | |
| 71 } // namespace webrtc | |
| 72 | |
| 73 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_INTERNAL_H_ | |
| OLD | NEW |