Suppress harder for echo without affecting the volume of real voice.

Change-Id: Ia3ce98eedd487a9e879ff0a4907b8c15b5707429
This commit is contained in:
Chung-yih Wang
2010-10-08 06:06:56 +08:00
parent a1bf0a06b2
commit 4483232f57

View File

@@ -157,11 +157,12 @@ void EchoSuppressor::run(int16_t *playbacked, int16_t *recorded)
if (correlation > 0.3f) {
float factor = 1.0f - correlation;
factor *= factor;
factor /= 2.0; // suppress harder
for (int i = 0; i < mSampleCount; ++i) {
recorded[i] *= factor;
}
}
// LOGI("latency %5d, correlation %.10f", latency, correlation);
//LOGI("latency %5d, correlation %.10f", latency, correlation);
// Increase RecordOffset.