aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNir Bruderman <nbruderman@gmail.com>2014-10-01 21:42:27 +0000
committerSergiu Cozma <lssjbrolli@gmail.com>2015-03-28 11:40:16 +0200
commit472af51571aa6703b8958a60bfc715c5f9014f49 (patch)
tree6ca16f9954dc2a981d6850d15f3d9987a9149467
parentfb30565f5faec9481e874bb8f2307b32c72722cf (diff)
Revert "voice fx: fix effect state control logic."
Since this commit was merged, the Echo effect while talking got much worse. The echo suppression effect doesn't seems to work at all now. This reverts commit 602c06af383002698fdc57f72736cf28164d2067. Change-Id: Ie7335c845797ebbd89adf9dcf13cef9f398152e5
-rw-r--r--audio/eS325VoiceProcessing.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/audio/eS325VoiceProcessing.cpp b/audio/eS325VoiceProcessing.cpp
index b550a1a..6e93820 100644
--- a/audio/eS325VoiceProcessing.cpp
+++ b/audio/eS325VoiceProcessing.cpp
@@ -1283,21 +1283,17 @@ int Adnc_ApplySettingsFromSessionContextInt_l(adnc_pfx_session_t * session)
status = Adnc_SetNoiseSuppressionInt_l(ns_on /*ns_on*/);
// AEC
- if (session->createdMsk & (1 << PFX_ID_AEC)) { /* the effect has been created */
- const bool aec_on = ((session->activeMsk & (1 << PFX_ID_AEC)) != 0);
- int aec_status = Adnc_SetEchoCancellationInt_l(aec_on /*aec_on*/);
- if (status == 0) {
- status = aec_status;
- }
+ if ((session->createdMsk & (1 << PFX_ID_AEC)) /* the effect has been created */
+ && (session->activeMsk & (1 << PFX_ID_AEC))) /* the effect is active */
+ {
+ Adnc_SetEchoCancellationInt_l(true /*aec_on*/);
}
// AGC
- if (session->createdMsk & (1 << PFX_ID_AGC)) { /* the effect has been created */
- const bool agc_on = ((session->activeMsk & (1 << PFX_ID_AGC)) != 0);
- int agc_status = Adnc_SetAutomaticGainControlInt_l(agc_on /*agc_on*/);
- if (status == 0) {
- status = agc_status;
- }
+ if ((session->createdMsk & (1 << PFX_ID_AGC)) /* the effect has been created */
+ && (session->activeMsk & (1 << PFX_ID_AGC))) /* the effect is active */
+ {
+ Adnc_SetAutomaticGainControlInt_l(true /*agc_on*/);
}
return status;