Commit 65f4649c authored by Alexandre Savard's avatar Alexandre Savard

[#1966] Add echostate structure in echo canceller

parent e7fca1e2
......@@ -20,9 +20,16 @@
#include "echocancel.h"
EchoCancel::EchoCancel() {}
#define FRAME_SIZE 160
#define FILTER_LENGTH 2000
EchoCancel::~EchoCancel() {}
EchoCancel::EchoCancel() {
_echoState = speex_echo_state_init(FRAME_SIZE, FILTER_LENGTH);
}
EchoCancel::~EchoCancel() {
speex_echo_state_destroy(_echoState);
}
void EchoCancel::process(SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData) {
......
......@@ -38,6 +38,9 @@ class EchoCancel : public Algorithm {
* \param outputData containing the processed data
*/
virtual void process(SFLDataFormat *micData, SFLDataFormat *spkrData, SFLDataFormat *outputData);
private:
SpeexEchoState *_echoState;
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment