aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-24 08:52:51 -0700
committerChris Robinson <[email protected]>2009-09-24 08:52:51 -0700
commit83734aff0e1061639f41effc840cf4ab2e5f93b0 (patch)
tree3d3df75e8162a8ca69fb4ed55c1be6ac3bdce525
parent617b6728d3bf4f3922f87702260d848b9ae88340 (diff)
Slightly improve the multi-channel mixing loops
-rw-r--r--Alc/ALu.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index bdd10db1..a2bcc968 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -785,7 +785,6 @@ static void MixSomeSources(ALCcontext *ALContext, float (*DryBuffer)[OUTPUTCHANN
ALfloat DrySend[OUTPUTCHANNELS] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
ALfloat dryGainStep[OUTPUTCHANNELS];
ALfloat wetGainStep[MAX_SENDS];
- ALfloat values[OUTPUTCHANNELS];
ALuint i, j, k, out;
ALsource *ALSource;
ALfloat value;
@@ -1041,14 +1040,9 @@ another_source:
for(i = 0;i < Channels;i++) \
{ \
value = lerp(Data[k*Channels + i], Data[(k+1)*Channels + i], DataPosFrac); \
- values[i] = lpFilter2P(DryFilter, chans[i]*2, value)*DrySend[chans[i]]; \
- } \
- for(out = 0;out < OUTPUTCHANNELS;out++) \
- { \
- ALfloat sum = 0.0f; \
- for(i = 0;i < Channels;i++) \
- sum += values[i]*Matrix[chans[i]][out]; \
- DryBuffer[j][out] += sum; \
+ value = lpFilter2P(DryFilter, chans[i]*2, value)*DrySend[chans[i]]; \
+ for(out = 0;out < OUTPUTCHANNELS;out++) \
+ DryBuffer[j][out] += value*Matrix[chans[i]][out]; \
} \
\
DataPosFrac += increment; \