Commit 44f84de2 authored by Alexandre Savard's avatar Alexandre Savard

#5814: Process noise reduction before echo cancelling

parent dd6a42c6
......@@ -294,13 +294,14 @@ int AudioRtpRecordHandler::processDataEncode (void)
_audioRtpRecord.audioProcessMutex.enter();
echoCanceller.process(micDataConverted, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
if (Manager::instance().audioPreference.getNoiseReduce()) {
_audioRtpRecord._audioProcess->processAudio (micDataEchoCancelled, nbSample * sizeof (SFLDataFormat));
// _audioRtpRecord._audioProcess->processAudio (micDataConverted, nbSample * sizeof (SFLDataFormat));
// _audioRtpRecord._audioProcess->processAudio (micDataEchoCancelled, nbSample * sizeof (SFLDataFormat));
_audioRtpRecord._audioProcess->processAudio (micDataConverted, nbSample * sizeof (SFLDataFormat));
}
echoCanceller.process(micDataConverted, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
_audioRtpRecord.audioProcessMutex.leave();
_audioRtpRecord.audioCodecMutex.enter();
......@@ -314,14 +315,15 @@ int AudioRtpRecordHandler::processDataEncode (void)
_audioRtpRecord.audioProcessMutex.enter();
if (Manager::instance().audioPreference.getNoiseReduce()) {
_audioRtpRecord._audioProcess->processAudio (micData, nbSample * sizeof (SFLDataFormat));
// _audioRtpRecord._audioProcess->processAudio (micDataEchoCancelled, nbSample * sizeof (SFLDataFormat));
}
echoCanceller.process(micData, micDataEchoCancelled, nbSample * sizeof(SFLDataFormat));
teststream.write(reinterpret_cast<char *>(micDataEchoCancelled), nbSample * sizeof(SFLDataFormat));
if (Manager::instance().audioPreference.getNoiseReduce()) {
// _audioRtpRecord._audioProcess->processAudio (micData, nbSample * sizeof (SFLDataFormat));
_audioRtpRecord._audioProcess->processAudio (micDataEchoCancelled, nbSample * sizeof (SFLDataFormat));
}
_audioRtpRecord.audioProcessMutex.leave();
......
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