From 8dc2aef05851ebdc2e2a9bf443b529afba9a7e86 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 21 Dec 2007 12:12:13 -0800 Subject: Don't send stereo samples to the wet path without an auxiliary slot --- Alc/ALu.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Alc/ALu.c') 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)); + //First order interpolator (right) + value2 = (ALfloat)((ALshort)(((Data[k*2+1]*((1L<>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)); //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++; -- cgit v1.2.3