FaceAccess/Record/SpeexDsp.cpp
2024-09-04 17:57:23 +08:00

16 lines
338 B
C++

#include "SpeexDsp.h"
#include <speex/speex_echo.h>
#include <speex/speex_preprocess.h>
void SpeexDsp::reset() {
if (m_state != nullptr) {
speex_echo_state_reset(m_state);
}
}
void SpeexDsp::preprocess(int16_t *pcm) {
if (m_preprocessState != nullptr) {
speex_preprocess_run(m_preprocessState, pcm);
}
}