Index: webrtc/modules/audio_processing/aec/echo_cancellation.h |
diff --git a/webrtc/modules/audio_processing/aec/echo_cancellation.h b/webrtc/modules/audio_processing/aec/echo_cancellation.h |
index f4b1f20ab75b41e331aeb6af07f70925c9481ee2..8e5e52c32bfbb9ebe81ce4eb8521d18925afb671 100644 |
--- a/webrtc/modules/audio_processing/aec/echo_cancellation.h |
+++ b/webrtc/modules/audio_processing/aec/echo_cancellation.h |
@@ -11,8 +11,14 @@ |
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_ |
#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_ECHO_CANCELLATION_H_ |
+#include <memory> |
+ |
#include <stddef.h> |
+extern "C" { |
+#include "webrtc/common_audio/ring_buffer.h" |
+} |
+#include "webrtc/modules/audio_processing/aec/aec_core.h" |
#include "webrtc/typedefs.h" |
namespace webrtc { |
@@ -56,6 +62,54 @@ typedef struct { |
struct AecCore; |
+class ApmDataDumper; |
+ |
+typedef struct Aec { |
+ std::unique_ptr<ApmDataDumper> data_dumper; |
+ |
+ int delayCtr; |
+ int sampFreq; |
+ int splitSampFreq; |
+ int scSampFreq; |
+ float sampFactor; // scSampRate / sampFreq |
+ short skewMode; |
+ int bufSizeStart; |
+ int knownDelay; |
+ int rate_factor; |
+ |
+ short initFlag; // indicates if AEC has been initialized |
+ |
+ // Variables used for averaging far end buffer size |
+ short counter; |
+ int sum; |
+ short firstVal; |
+ short checkBufSizeCtr; |
+ |
+ // Variables used for delay shifts |
+ short msInSndCardBuf; |
+ short filtDelay; // Filtered delay estimate. |
+ int timeForDelayChange; |
+ int startup_phase; |
+ int checkBuffSize; |
+ short lastDelayDiff; |
+ |
+ // Structures |
+ void* resampler; |
+ |
+ int skewFrCtr; |
+ int resample; // if the skew is small enough we don't resample |
+ int highSkewCtr; |
+ float skew; |
+ |
+ RingBuffer* far_pre_buf; // Time domain far-end pre-buffer. |
+ |
+ int farend_started; |
+ |
+ // Aec instance counter. |
+ static int instance_count; |
+ AecCore* aec; |
+} Aec; |
+ |
/* |
* Allocates the memory needed by the AEC. The memory needs to be initialized |
* separately using the WebRtcAec_Init() function. Returns a pointer to the |