From ec7f20644da31cce18072ed12e06ef3b991008e8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 8 Feb 2008 21:03:48 -0800 Subject: [PATCH] Fast float-to-int function is no longer needed --- Alc/ALu.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index c88261f9..609faa9d 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -162,24 +162,12 @@ __inline ALuint aluChannelsFromFormat(ALenum format) } } -static __inline ALint aluF2L(ALfloat Value) -{ -#if 0 - if(sizeof(ALint) == 4 && sizeof(double) == 8) - { - double temp; - temp = Value + (((65536.0*65536.0*16.0)+(65536.0*65536.0*8.0))*65536.0); - return *((ALint*)&temp); - } -#endif - return (ALint)Value; -} static __inline ALshort aluF2S(ALfloat Value) { ALint i; - i = aluF2L(Value); + i = (ALint)Value; i = __min( 32767, i); i = __max(-32768, i); return ((ALshort)i); @@ -678,7 +666,7 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma WetSample = ALSource->LastWetSample; //Compute 18.14 fixed point step - increment = aluF2L(Pitch*(1L< (MAX_PITCH<