audio_processing/aec: Fixes an incorrect sampling rate multiplier when processing in 48 kHz
In AEC a fixed fft size is used, but processing can in the lower band be in either 8 or 16 kHz. Therefore we need a multiplier/rate factor to, for example, map frequency bands in Hz to frequency bins. The multiplier/rate factor can only be either 1 or 2, but when 48 kHz support was added it was assigned 3. BUG=crbug.com/482424 R=aluebs@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43329004 Cr-Commit-Position: refs/heads/master@{#9117}
This commit is contained in:
parent
efbde3775b
commit
3cfa756f37
@ -1607,10 +1607,11 @@ int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
|
||||
// Default target suppression mode.
|
||||
aec->nlp_mode = 1;
|
||||
|
||||
// Sampling frequency multiplier
|
||||
// SWB is processed as 160 frame size
|
||||
// Sampling frequency multiplier w.r.t. 8 kHz.
|
||||
// In case of multiple bands we process the lower band in 16 kHz, hence the
|
||||
// multiplier is always 2.
|
||||
if (aec->num_bands > 1) {
|
||||
aec->mult = (short)aec->sampFreq / 16000;
|
||||
aec->mult = 2;
|
||||
} else {
|
||||
aec->mult = (short)aec->sampFreq / 8000;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user