diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-15 23:31:58 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-06-15 23:31:58 +0000 |
commit | 29043c589c397e87c3cc42d73e5131886481c6bb (patch) | |
tree | 4c0e7e90f7900e48fe7cf23fa883505814520cdb /libao2/pl_eq.c | |
parent | 7bdbd38f2f7bec813aca8a345a7bccbfc87f2bf0 (diff) | |
download | mpv-29043c589c397e87c3cc42d73e5131886481c6bb.tar.bz2 mpv-29043c589c397e87c3cc42d73e5131886481c6bb.tar.xz |
Remove unportable lround and maybe speed up rounding a bit.
Anders: please check if this is correct.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6438 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/pl_eq.c')
-rw-r--r-- | libao2/pl_eq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libao2/pl_eq.c b/libao2/pl_eq.c index 11874520ce..2588b383d1 100644 --- a/libao2/pl_eq.c +++ b/libao2/pl_eq.c @@ -94,11 +94,11 @@ void bp2(int16_t* a, int16_t* b, float fc, float q){ 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 |