Combine duplicate lines into the mixing macro

This commit is contained in:
Chris Robinson
2010-07-31 21:09:59 -07:00
parent 30108c7855
commit 41e2c41ecc
+2 -6
View File
@@ -1170,10 +1170,10 @@ next_source:
const int chans2[] = {
BACK_LEFT, SIDE_LEFT, BACK_RIGHT, SIDE_RIGHT
};
const ALfloat scaler = 1.0f/Channels;
const ALfloat dupscaler = aluSqrt(1.0f/3.0f);
#define DO_MIX(resampler) do { \
const ALfloat scaler = 1.0f/Channels; \
while(BufferSize--) \
{ \
for(i = 0;i < OUTPUTCHANNELS;i++) \
@@ -1223,9 +1223,9 @@ next_source:
const int chans[] = {
FRONT_LEFT, FRONT_RIGHT
};
const ALfloat scaler = 1.0f/Channels;
#define DO_MIX(resampler) do { \
const ALfloat scaler = 1.0f/Channels; \
while(BufferSize--) \
{ \
for(i = 0;i < OUTPUTCHANNELS;i++) \
@@ -1273,7 +1273,6 @@ next_source:
FRONT_LEFT, FRONT_RIGHT,
BACK_LEFT, BACK_RIGHT
};
const ALfloat scaler = 1.0f/Channels;
switch(Resampler)
{
@@ -1295,7 +1294,6 @@ next_source:
FRONT_CENTER, LFE,
BACK_LEFT, BACK_RIGHT
};
const ALfloat scaler = 1.0f/Channels;
switch(Resampler)
{
@@ -1318,7 +1316,6 @@ next_source:
BACK_CENTER,
SIDE_LEFT, SIDE_RIGHT
};
const ALfloat scaler = 1.0f/Channels;
switch(Resampler)
{
@@ -1341,7 +1338,6 @@ next_source:
BACK_LEFT, BACK_RIGHT,
SIDE_LEFT, SIDE_RIGHT
};
const ALfloat scaler = 1.0f/Channels;
switch(Resampler)
{