aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 398912da..be1f6103 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -813,10 +813,13 @@ static void Write_##T##_##N(ALCdevice *device, T *RESTRICT buffer, \
const enum Channel *ChanMap = device->DevChannels; \
ALuint i, j; \
\
- for(i = 0;i < SamplesToDo;i++) \
+ for(j = 0;j < N;j++) \
{ \
- for(j = 0;j < N;j++) \
- *(buffer++) = func(DryBuffer[i][ChanMap[j]]); \
+ T *RESTRICT out = buffer + j; \
+ enum Channel chan = ChanMap[j]; \
+ \
+ for(i = 0;i < SamplesToDo;i++) \
+ out[i*N] = func(DryBuffer[i][chan]); \
} \
}