aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-03-13 08:46:54 -0700
committerChris Robinson <[email protected]>2011-03-13 08:46:54 -0700
commit4eeed5376f913aa27ad88738c14c2e1b25ab056b (patch)
tree8d1ba98053f38fb2ccc728e45f3e314abf9c01fd /Alc/ALu.c
parent77ad538e68ce17e29902680d8cce708a2a105b4e (diff)
Invert the device matrix row/column
It is accessed now as mat[target][source]
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 70d2a480..7ac6f2fe 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -746,7 +746,7 @@ static void Write_##T##_##chans(ALCdevice *device, T *buffer, ALuint SamplesToDo
{ \
ALfloat samp = 0.0f; \
for(c = 0;c < MAXCHANNELS;c++) \
- samp += DryBuffer[i][c] * Matrix[c][chans[j]]; \
+ samp += DryBuffer[i][c] * Matrix[chans[j]][c]; \
buffer[ChanMap[chans[j]]] = func(samp); \
} \
buffer += N; \
@@ -800,8 +800,8 @@ static void Write_##T##_##chans(ALCdevice *device, T *buffer, ALuint SamplesToDo
float samples[2] = { 0.0f, 0.0f }; \
for(c = 0;c < MAXCHANNELS;c++) \
{ \
- samples[0] += DryBuffer[i][c]*Matrix[c][FRONT_LEFT]; \
- samples[1] += DryBuffer[i][c]*Matrix[c][FRONT_RIGHT]; \
+ samples[0] += DryBuffer[i][c]*Matrix[FRONT_LEFT][c]; \
+ samples[1] += DryBuffer[i][c]*Matrix[FRONT_RIGHT][c]; \
} \
bs2b_cross_feed(device->Bs2b, samples); \
buffer[ChanMap[FRONT_LEFT]] = func(samples[0]); \
@@ -817,7 +817,7 @@ static void Write_##T##_##chans(ALCdevice *device, T *buffer, ALuint SamplesToDo
{ \
ALfloat samp = 0.0f; \
for(c = 0;c < MAXCHANNELS;c++) \
- samp += DryBuffer[i][c] * Matrix[c][chans[j]]; \
+ samp += DryBuffer[i][c] * Matrix[chans[j]][c]; \
buffer[ChanMap[chans[j]]] = func(samp); \
} \
buffer += N; \