aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c2
-rw-r--r--Alc/mixer.c2
-rw-r--r--OpenAL32/Include/alu.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 57af55bf..a5541da8 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -330,6 +330,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
DirectChannels = ALSource->DirectChannels;
voice->Direct.OutBuffer = Device->DryBuffer;
+ voice->Direct.NumChannels = Device->NumChannels;
for(i = 0;i < NumSends;i++)
{
ALeffectslot *Slot = ALSource->Send[i].Slot;
@@ -659,6 +660,7 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte
RoomRolloffBase = ALSource->RoomRolloffFactor;
voice->Direct.OutBuffer = Device->DryBuffer;
+ voice->Direct.NumChannels = Device->NumChannels;
for(i = 0;i < NumSends;i++)
{
ALeffectslot *Slot = ALSource->Send[i].Slot;
diff --git a/Alc/mixer.c b/Alc/mixer.c
index b9bd4463..4f10c629 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -415,7 +415,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam
Device->FilteredData, ResampledData, DstBufferSize,
parms->Filters[chan].ActiveType
);
- Mix(samples, Device->NumChannels, parms->OutBuffer, parms->Gains[chan],
+ Mix(samples, parms->NumChannels, parms->OutBuffer, parms->Gains[chan],
parms->Counter, OutPos, DstBufferSize);
}
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 0ff8ddbc..c96d5563 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -58,6 +58,7 @@ typedef struct MixGains {
typedef struct DirectParams {
ALfloat (*OutBuffer)[BUFFERSIZE];
+ ALuint NumChannels;
/* If not 'moving', gain/coefficients are set directly without fading. */
ALboolean Moving;