aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index e0e5f8a3..a44c04b3 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -931,16 +931,19 @@ static int Write_##T(ALCdevice *device, T *RESTRICT buffer, \
{ \
ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = device->DryBuffer; \
ALuint numchans = ChannelsFromDevFmt(device->FmtChans); \
- const enum Channel *ChanMap = device->DevChannels; \
+ const ALuint *offsets = device->ChannelOffsets; \
ALuint i, j; \
\
- for(j = 0;j < numchans;j++) \
+ for(j = 0;j < MaxChannels;j++) \
{ \
- T *RESTRICT out = buffer + j; \
- enum Channel chan = ChanMap[j]; \
+ T *RESTRICT out; \
\
+ if(offsets[j] == INVALID_OFFSET) \
+ continue; \
+ \
+ out = buffer + offsets[j]; \
for(i = 0;i < SamplesToDo;i++) \
- out[i*numchans] = func(DryBuffer[chan][i]); \
+ out[i*numchans] = func(DryBuffer[j][i]); \
} \
return SamplesToDo*numchans*sizeof(T); \
}