aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-22 13:10:32 -0800
committerChris Robinson <[email protected]>2014-11-22 13:10:32 -0800
commit4ebf0ad717d9f2876b3d9a3173dae6981aa69cc1 (patch)
tree3c97821b6bb8494766deb2b4dde14b8fc0b07420 /Alc
parentdece86f61f975c7a6f3bcc1d00bd4cf97dcdbcab (diff)
Mix DirectChannel sources to the non-virtual channel buffers
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index a5541da8..493240ac 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -496,7 +496,24 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
}
else if(DirectChannels != AL_FALSE)
{
- for(c = 0;c < num_channels;c++)
+ if(Device->Hrtf)
+ {
+ voice->Direct.OutBuffer = &voice->Direct.OutBuffer[voice->Direct.NumChannels];
+ voice->Direct.NumChannels = 2;
+ for(c = 0;c < num_channels;c++)
+ {
+ MixGains *gains = voice->Direct.Gains[c];
+
+ for(j = 0;j < MAX_OUTPUT_CHANNELS;j++)
+ gains[j].Target = 0.0f;
+
+ if(chans[c].channel == FrontLeft)
+ gains[0].Target = DryGain;
+ else if(chans[c].channel == FrontRight)
+ gains[1].Target = DryGain;
+ }
+ }
+ else for(c = 0;c < num_channels;c++)
{
MixGains *gains = voice->Direct.Gains[c];
int idx;