diff options
author | Chris Robinson <[email protected]> | 2008-01-01 06:29:11 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-01 06:29:11 -0800 |
commit | 9ed574b39958c49f3e4b6ffc4c6a3153273d33b1 (patch) | |
tree | 21eb5bff700bd5a639880a1406c7bce470031047 /Alc/ALu.c | |
parent | 4e2f8e305ec9d738c04aa07dc20e79c2672ec455 (diff) | |
parent | 7ef623c71d092f696f5bd7f7170ba475728ecccf (diff) |
Merge branch 'master' into efx-experiment
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 46 |
1 files changed, 24 insertions, 22 deletions
@@ -744,28 +744,6 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma if(Channels >= 4) { int i = 2; - if(Channels >= 7) - { - //First order interpolator (side left) - value = (ALfloat)((ALshort)(((Data[k*Channels+2]*((1L<<FRACTIONBITS)-fraction))+(Data[(k+1)*Channels+2]*(fraction)))>>FRACTIONBITS)); - DryBuffer[j][SIDE_LEFT] += value*DrySend[SIDE_LEFT]; - WetBuffer[j][SIDE_LEFT] += value*WetSend[SIDE_LEFT]; - //First order interpolator (side right) - value = (ALfloat)((ALshort)(((Data[k*Channels+3]*((1L<<FRACTIONBITS)-fraction))+(Data[(k+1)*Channels+3]*(fraction)))>>FRACTIONBITS)); - DryBuffer[j][SIDE_RIGHT] += value*DrySend[SIDE_RIGHT]; - WetBuffer[j][SIDE_RIGHT] += value*WetSend[SIDE_RIGHT]; - i += 2; - } - //First order interpolator (back left) - value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<<FRACTIONBITS)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>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)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>FRACTIONBITS)); - DryBuffer[j][BACK_RIGHT] += value*DrySend[BACK_RIGHT]; - WetBuffer[j][BACK_RIGHT] += value*WetSend[BACK_RIGHT]; - i++; if(Channels >= 6) { if(Channels != 7) @@ -780,6 +758,30 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma value = (ALfloat)((ALshort)(((Data[k*Channels+i]*((1L<<FRACTIONBITS)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>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)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>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)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>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)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>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)-fraction))+(Data[(k+1)*Channels+i]*(fraction)))>>FRACTIONBITS)); + DryBuffer[j][SIDE_RIGHT] += value*DrySend[SIDE_RIGHT]; + WetBuffer[j][SIDE_RIGHT] += value*WetSend[SIDE_RIGHT]; + i++; } } } |