summaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-07-31 21:09:59 -0700
committerChris Robinson <[email protected]>2010-07-31 21:09:59 -0700
commit41e2c41ecc18ae69e0ff7843874de40471204d5e (patch)
tree0a2d4415ffe99ef546642709cbf1aa5b51481502 /Alc/ALu.c
parent30108c78555c082218fc16556cc29c193078a6a3 (diff)
Combine duplicate lines into the mixing macro
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index e3ebbd86..4f345e51 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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)
{