aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-21 12:12:13 -0800
committerChris Robinson <[email protected]>2007-12-21 12:12:13 -0800
commit8dc2aef05851ebdc2e2a9bf443b529afba9a7e86 (patch)
tree143fe33fecef56219e099f0e836227681445af3d
parentd43486f894635f17a154dce29d85ed4423d1a79c (diff)
Don't send stereo samples to the wet path without an auxiliary slot
-rw-r--r--Alc/ALu.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index fbf4dc0e..8aa02c03 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -615,18 +615,25 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma
}
else
{
+ ALfloat value2;
+
//First order interpolator (left)
value = (ALfloat)((ALshort)(((Data[k*2 ]*((1L<<FRACTIONBITS)-fraction))+(Data[k*2+2]*(fraction)))>>FRACTIONBITS));
+ //First order interpolator (right)
+ value2 = (ALfloat)((ALshort)(((Data[k*2+1]*((1L<<FRACTIONBITS)-fraction))+(Data[k*2+3]*(fraction)))>>FRACTIONBITS));
+
//Direct path final mix buffer and panning (left)
DryBuffer[j][0] += value*DrySend[0];
- //Room path final mix buffer and panning (left)
- WetBuffer[j][0] += value*WetSend[0];
- //First order interpolator (right)
- value = (ALfloat)((ALshort)(((Data[k*2+1]*((1L<<FRACTIONBITS)-fraction))+(Data[k*2+3]*(fraction)))>>FRACTIONBITS));
//Direct path final mix buffer and panning (right)
DryBuffer[j][1] += value*DrySend[1];
- //Room path final mix buffer and panning (right)
- WetBuffer[j][1] += value*WetSend[1];
+
+ if(ALSource->Send[0].Slot.effectslot)
+ {
+ //Room path final mix buffer and panning (left)
+ WetBuffer[j][0] += value*WetSend[0];
+ //Room path final mix buffer and panning (right)
+ WetBuffer[j][1] += value*WetSend[1];
+ }
}
DataPosFrac += increment;
j++;