From cfe620ccb5496f8e928cdba0c74fd26b5fd87f34 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 8 Aug 2008 00:21:25 -0700 Subject: Remove unnecessary casting --- Alc/ALu.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index 2c5cde40..404dea66 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -785,11 +785,13 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma { ALfloat samp1, samp2; //First order interpolator (front left) - samp1 = (ALfloat)((ALshort)(((Data[k*Channels ]*((1L<>FRACTIONBITS)); + samp1 = (Data[k*Channels]*((1<> FRACTIONBITS; DryBuffer[j][FRONT_LEFT] += samp1*DrySend[FRONT_LEFT]; WetBuffer[j][FRONT_LEFT] += samp1*WetSend[FRONT_LEFT]; //First order interpolator (front right) - samp2 = (ALfloat)((ALshort)(((Data[k*Channels+1]*((1L<>FRACTIONBITS)); + samp2 = (Data[k*Channels+1]*((1<> FRACTIONBITS; DryBuffer[j][FRONT_RIGHT] += samp2*DrySend[FRONT_RIGHT]; WetBuffer[j][FRONT_RIGHT] += samp2*WetSend[FRONT_RIGHT]; if(Channels >= 4) @@ -800,36 +802,42 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma if(Channels != 7) { //First order interpolator (center) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<>FRACTIONBITS)); + value = (Data[k*Channels+i]*((1<> FRACTIONBITS; DryBuffer[j][CENTER] += value*DrySend[CENTER]; WetBuffer[j][CENTER] += value*WetSend[CENTER]; i++; } //First order interpolator (lfe) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<>FRACTIONBITS)); + value = (Data[k*Channels+i]*((1<> FRACTIONBITS; DryBuffer[j][LFE] += value*DrySend[LFE]; WetBuffer[j][LFE] += value*WetSend[LFE]; i++; } //First order interpolator (back left) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<>FRACTIONBITS)); + value = (Data[k*Channels+i]*((1<> FRACTIONBITS; DryBuffer[j][BACK_LEFT] += value*DrySend[BACK_LEFT]; WetBuffer[j][BACK_LEFT] += value*WetSend[BACK_LEFT]; i++; //First order interpolator (back right) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<>FRACTIONBITS)); + value = (Data[k*Channels+i]*((1<> FRACTIONBITS; DryBuffer[j][BACK_RIGHT] += value*DrySend[BACK_RIGHT]; WetBuffer[j][BACK_RIGHT] += value*WetSend[BACK_RIGHT]; i++; if(Channels >= 7) { //First order interpolator (side left) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<>FRACTIONBITS)); + value = (Data[k*Channels+i]*((1<> FRACTIONBITS; DryBuffer[j][SIDE_LEFT] += value*DrySend[SIDE_LEFT]; WetBuffer[j][SIDE_LEFT] += value*WetSend[SIDE_LEFT]; i++; //First order interpolator (side right) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<>FRACTIONBITS)); + value = (Data[k*Channels+i]*((1<> FRACTIONBITS; DryBuffer[j][SIDE_RIGHT] += value*DrySend[SIDE_RIGHT]; WetBuffer[j][SIDE_RIGHT] += value*WetSend[SIDE_RIGHT]; i++; -- cgit v1.2.3