From 9c99bf982fd35b01c6bcec7ee82f2b77afd18a92 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 22 Apr 2008 15:03:29 +0000 Subject: [PATCH] windows build tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8170 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/voipcodecs/src/lpc10_decode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/voipcodecs/src/lpc10_decode.c b/libs/voipcodecs/src/lpc10_decode.c index 107542a68a..135373bfe7 100644 --- a/libs/voipcodecs/src/lpc10_decode.c +++ b/libs/voipcodecs/src/lpc10_decode.c @@ -66,7 +66,7 @@ static int32_t lpc10_random(lpc10_decode_state_t *s) /* The following is a 16 bit 2's complement addition, with overflow checking disabled */ - s->y[s->k] += s->y[s->j]; + s->y[s->k] = (int16_t)(s->y[s->k] + s->y[s->j]); ret_val = s->y[s->k]; if (--s->k < 0) s->k = 4; @@ -430,6 +430,7 @@ static int pitsyn(lpc10_decode_state_t *s, ip = (int32_t) uvpit; if (ip <= i - jused) { + float f; ++(*nout); ipiti[*nout - 1] = ip; *pitch = ip; @@ -444,7 +445,8 @@ static int pitsyn(lpc10_decode_state_t *s, xxy = expf(xxy); rci[j + *nout*rci_dim1 + 1] = (xxy - 1.0f)/(xxy + 1.0f); } - rmsi[*nout - 1] = logf(s->rmso) + prop*(logf(*rms) - logf(s->rmso)); + f = logf(*rms) - logf(s->rmso); + rmsi[*nout - 1] = logf(s->rmso) + prop * f; rmsi[*nout - 1] = expf(rmsi[*nout - 1]); } }