From 4eeed5376f913aa27ad88738c14c2e1b25ab056b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 13 Mar 2011 08:46:54 -0700 Subject: Invert the device matrix row/column It is accessed now as mat[target][source] --- Alc/ALu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Alc/ALu.c') 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; \ -- cgit v1.2.3