From a58c5fbad0639950337b6b7e02b5e67217c22b53 Mon Sep 17 00:00:00 2001 From: Grishka Date: Sun, 10 Feb 2019 15:45:30 +0300 Subject: [PATCH] Fixed build with TGVOIP_NO_DSP --- EchoCanceller.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EchoCanceller.cpp b/EchoCanceller.cpp index 604a905693..d11f110623 100755 --- a/EchoCanceller.cpp +++ b/EchoCanceller.cpp @@ -16,6 +16,7 @@ #include "VoIPServerConfig.h" #include #include +#include using namespace tgvoip; @@ -144,6 +145,7 @@ void EchoCanceller::Enable(bool enabled){ } void EchoCanceller::ProcessInput(int16_t* inOut, size_t numSamples, bool& hasVoice){ +#ifndef TGVOIP_NO_DSP if(!isOn || (!enableAEC && !enableAGC && !enableNS)){ return; } @@ -165,6 +167,7 @@ void EchoCanceller::ProcessInput(int16_t* inOut, size_t numSamples, bool& hasVoi hasVoice=hasVoice || apm->voice_detection()->stream_has_voice(); } memcpy(inOut+480, audioFrame->data(), 480*2); +#endif } void EchoCanceller::SetAECStrength(int strength){ @@ -182,7 +185,9 @@ void EchoCanceller::SetAECStrength(int strength){ void EchoCanceller::SetVoiceDetectionEnabled(bool enabled){ enableVAD=enabled; +#ifndef TGVOIP_NO_DSP apm->voice_detection()->Enable(enabled); +#endif } using namespace tgvoip::effects;