[Mplayer-cvslog] CVS: main/libao2 pl_eq.c,1.1,1.2
Atmosfear
atmos4 at mplayerhq.hu
Sun Jun 16 01:32:03 CEST 2002
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var/tmp.root/cvs-serv20340/libao2
Modified Files:
pl_eq.c
Log Message:
Remove unportable lround and maybe speed up rounding a bit.
Anders: please check if this is correct.
Index: pl_eq.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/pl_eq.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pl_eq.c 15 Jun 2002 06:15:07 -0000 1.1
+++ pl_eq.c 15 Jun 2002 23:31:58 -0000 1.2
@@ -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
More information about the MPlayer-cvslog
mailing list