summaryrefslogtreecommitdiffstats
path: root/Alc/panning.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-10-31 22:43:13 -0700
committerChris Robinson <[email protected]>2014-10-31 22:43:13 -0700
commit3d2853274dbf81723b907677446bd09f94f35022 (patch)
tree6f6001476326386c838a61da0fb9775a6705d390 /Alc/panning.c
parent336aba6f1f9bc21d900435a264c048a36bca0fc8 (diff)
Support B-Format source rotation with AL_ORIENTATION
Diffstat (limited to 'Alc/panning.c')
-rw-r--r--Alc/panning.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Alc/panning.c b/Alc/panning.c
index 85de3626..ad8ad43b 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -81,16 +81,18 @@ void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfl
}
}
-void ComputeBFormatGains(const ALCdevice *device, ALuint channum, ALfloat ingain, ALfloat gains[MaxChannels])
+void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MaxChannels])
{
- ALuint i;
+ ALuint i, j;
for(i = 0;i < MaxChannels;i++)
gains[i] = 0.0f;
for(i = 0;i < device->NumSpeakers;i++)
{
enum Channel chan = device->Speaker[i].ChanName;
- gains[chan] = device->Speaker[i].FOACoeff[channum] * ingain;
+ for(j = 0;j < 4;j++)
+ gains[chan] += device->Speaker[i].FOACoeff[j] * mtx[j];
+ gains[chan] *= ingain;
}
}