diff --git a/daemon/src/audio/echosuppress.cpp b/daemon/src/audio/echosuppress.cpp index 36d13e25558d215798182ba24d7a9236f26723e3..f32a1da755f394c096ac7cce524ce157fa0895fa 100644 --- a/daemon/src/audio/echosuppress.cpp +++ b/daemon/src/audio/echosuppress.cpp @@ -17,21 +17,13 @@ EchoSuppress::EchoSuppress(pj_pool_t *pool) { - pj_thread_desc aPJThreadDesc; - pj_thread_t *pjThread; - - if (pj_thread_register("EchoCanceller", aPJThreadDesc, &pjThread) != PJ_SUCCESS) - _error("EchoCancel: Error: Could not register new thread"); - - if (!pj_thread_is_registered()) - _warn("EchoCancel: Thread not registered..."); - if (pjmedia_echo_create(pool, 8000, SAMPLES_PER_FRAME, 250, 0, PJMEDIA_ECHO_SIMPLE, &echoState) != PJ_SUCCESS) throw std::runtime_error("EchoCancel: Error: Could not create echo canceller"); } EchoSuppress::~EchoSuppress() { + pjmedia_echo_destroy(echoState); } void EchoSuppress::putData (SFLDataFormat *inputData, int samples)