I'm working with WebRtc native AEC API.
int32_t WebRtcAec_Process(void* aecInst, const float* const* nearend,
size_t num_bands, float* const* out,
size_t nrOfSamples, int16_t msInSndCardBuf,
int32_t skew);
I want to cancel echo from audio which has 48K sample rate, single channel(mono) with AEC.
But I don't know whynum_bands
is necessary. If I give value 1
for num_bands
I got fatal (assertion error) inside AEC (RTC_DCHECK_EQ(aec->num_bands, num_bands);
fails).
I checked the pre-calculated value of aec->num_bands
which is 3
for 48K,
From aec_core.cc
:
if (sampFreq == 8000) {
aec->num_bands = 1;
} else {
aec->num_bands = (size_t)(sampFreq / 16000);
}
Even if I use 3 for num_bands
, I got invalid-access crash. Do I need to split every frame into 3 part in some way?