From 66b1d8c94b5bcd33ab8c0857140e1eafe01011ee Mon Sep 17 00:00:00 2001 From: rfelker Date: Tue, 22 Feb 2005 02:12:58 +0000 Subject: finally the dreaded white-noise-with-floats bug is fixed!!!! the problem is that lrintf was not prototyped on some systems, but it's easier and faster just not to use it at all. looks like the cola goes to our friends the glibc developers for forgetting to put lrintf in math.h in some versions. :))) i'm sure there are other broken libcs too though. also fixed a minor bug in the int->float conversion where the range for float samples was exceeded... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14759 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_format.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'libaf') diff --git a/libaf/af_format.c b/libaf/af_format.c index 673183d5db..2777fdbc42 100644 --- a/libaf/af_format.c +++ b/libaf/af_format.c @@ -14,14 +14,6 @@ #include "../bswap.h" #include "../libvo/fastmemcpy.h" -// Integer to float conversion through lrintf() -#ifdef HAVE_LRINTF -#define __USE_ISOC99 1 -#include -#else -#define lrintf(x) ((int)(x)) -#endif - /* Functions used by play to convert the input audio to the correct format */ @@ -502,19 +494,19 @@ static void float2int(void* in, void* out, int len, int bps) switch(bps){ case(1): for(i=0;i