[webrtc] Only init WebRtcAec callbacks once.
parent
b7459cf8ab
commit
270d402d1f
|
@ -23,6 +23,7 @@
|
||||||
#include <stddef.h> // size_t
|
#include <stddef.h> // size_t
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "webrtc/common_audio/ring_buffer.h"
|
#include "webrtc/common_audio/ring_buffer.h"
|
||||||
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
|
||||||
|
@ -1573,6 +1574,9 @@ AecCore* WebRtcAec_CreateAec() {
|
||||||
#endif
|
#endif
|
||||||
aec->extended_filter_enabled = 0;
|
aec->extended_filter_enabled = 0;
|
||||||
|
|
||||||
|
static bool initted = false;
|
||||||
|
if (!initted) {
|
||||||
|
initted = true;
|
||||||
// Assembly optimization
|
// Assembly optimization
|
||||||
WebRtcAec_FilterFar = FilterFar;
|
WebRtcAec_FilterFar = FilterFar;
|
||||||
WebRtcAec_ScaleErrorSignal = ScaleErrorSignal;
|
WebRtcAec_ScaleErrorSignal = ScaleErrorSignal;
|
||||||
|
@ -1598,8 +1602,8 @@ AecCore* WebRtcAec_CreateAec() {
|
||||||
WebRtcAec_InitAec_neon();
|
WebRtcAec_InitAec_neon();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
aec_rdft_init();
|
aec_rdft_init();
|
||||||
|
}
|
||||||
|
|
||||||
return aec;
|
return aec;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue