[pulseaudio-discuss] [PATCH 08/23] echo-cancel: Use proper float constants in adrian-aec
Peter Meerwald
pmeerw at pmeerw.net
Wed Feb 13 08:26:55 PST 2013
From: Peter Meerwald <p.meerwald at bct-electronic.com>
Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>
---
src/modules/echo-cancel/adrian-aec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/modules/echo-cancel/adrian-aec.c b/src/modules/echo-cancel/adrian-aec.c
index c079e65..05a5d51 100644
--- a/src/modules/echo-cancel/adrian-aec.c
+++ b/src/modules/echo-cancel/adrian-aec.c
@@ -33,7 +33,7 @@
/* Vector Dot Product */
static REAL dotp(REAL a[], REAL b[])
{
- REAL sum0 = 0.0, sum1 = 0.0;
+ REAL sum0 = 0.0f, sum1 = 0.0f;
int j;
for (j = 0; j < NLMS_LEN; j += 2) {
@@ -138,11 +138,11 @@ static float AEC_dtd(AEC *a, REAL d, REAL x)
a->xslow += ALPHASLOW * (fabsf(x) - a->xslow);
if (a->xfast < M70dB_PCM) {
- return 0.0; // no Spk signal
+ return 0.0f; // no Spk signal
}
if (a->dfast < M70dB_PCM) {
- return 0.0; // no Mic signal
+ return 0.0f; // no Mic signal
}
// ratio of NFRs
@@ -206,7 +206,7 @@ static REAL AEC_nlms_pw(AEC *a, REAL d, REAL x_, float stepsize)
// optimize: iterative dotp(xf, xf)
a->dotp_xf_xf += (a->xf[a->j] * a->xf[a->j] - a->xf[a->j + NLMS_LEN - 1] * a->xf[a->j + NLMS_LEN - 1]);
- if (stepsize > 0.0) {
+ if (stepsize > 0.0f) {
// calculate variable step size
REAL mikro_ef = stepsize * ef / a->dotp_xf_xf;
--
1.7.9.5
More information about the pulseaudio-discuss
mailing list