Mercurial > mplayer.hg
changeset 6437:61d750b7a989
Remove unportable lround and maybe speed up rounding a bit.
Anders: please check if this is correct.
author | atmos4 |
---|---|
date | Sat, 15 Jun 2002 23:31:58 +0000 |
parents | a2eb6f519855 |
children | 88938fa0c659 |
files | libao2/pl_eq.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/pl_eq.c Sat Jun 15 19:47:10 2002 +0000 +++ b/libao2/pl_eq.c Sat Jun 15 23:31:58 2002 +0000 @@ -94,11 +94,11 @@ double th=2*3.141592654*fc; double C=(1 - tan(th*q/2))/(1 + tan(th*q/2)); - a[0] = (int16_t)lround( 16383.0 * (1 + C) * cos(th)); - a[1] = (int16_t)lround(-16383.0 * C); + a[0] = (int16_t)( 16383.0 * (1 + C) * cos(th) + 0.5); + a[1] = (int16_t)(-16383.0 * C + 0.5); - b[0] = (int16_t)lround(-16383.0 * (C - 1)/2); - b[1] = (int16_t)lround(-16383.0 * 1.0050); + b[0] = (int16_t)(-16383.0 * (C - 1)/2 + 0.5); + b[1] = (int16_t)(-16383.0 * 1.0050 + 0.5); } // empty buffers