#include "modules/audio_processing/aecm/echo_control_mobile.h"
#ifdef AEC_DEBUG
#include <stdio.h>
#endif
#include <stdlib.h>
#include <string.h>
extern "C" {
#include "common_audio/ring_buffer.h"
#include "common_audio/signal_processing/include/signal_processing_library.h"
#include "modules/audio_processing/aecm/aecm_defines.h"
}
#include "modules/audio_processing/aecm/aecm_core.h"
namespace webrtc {
namespace {
#define BUF_SIZE_FRAMES …
#define MAX_RESAMP_LEN …
static const size_t kBufSizeSamp = …;
static const int kSampMsNb = …;
static const int kInitCheck = …;
AecMobile;
}
static int WebRtcAecm_EstBufDelay(AecMobile* aecm, short msInSndCardBuf);
static int WebRtcAecm_DelayComp(AecMobile* aecm);
void* WebRtcAecm_Create() { … }
void WebRtcAecm_Free(void* aecmInst) { … }
int32_t WebRtcAecm_Init(void* aecmInst, int32_t sampFreq) { … }
int32_t WebRtcAecm_GetBufferFarendError(void* aecmInst,
const int16_t* farend,
size_t nrOfSamples) { … }
int32_t WebRtcAecm_BufferFarend(void* aecmInst,
const int16_t* farend,
size_t nrOfSamples) { … }
int32_t WebRtcAecm_Process(void* aecmInst,
const int16_t* nearendNoisy,
const int16_t* nearendClean,
int16_t* out,
size_t nrOfSamples,
int16_t msInSndCardBuf) { … }
int32_t WebRtcAecm_set_config(void* aecmInst, AecmConfig config) { … }
int32_t WebRtcAecm_InitEchoPath(void* aecmInst,
const void* echo_path,
size_t size_bytes) { … }
int32_t WebRtcAecm_GetEchoPath(void* aecmInst,
void* echo_path,
size_t size_bytes) { … }
size_t WebRtcAecm_echo_path_size_bytes() { … }
static int WebRtcAecm_EstBufDelay(AecMobile* aecm, short msInSndCardBuf) { … }
static int WebRtcAecm_DelayComp(AecMobile* aecm) { … }
}