aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/panning.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/panning.c')
-rw-r--r--Alc/panning.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/Alc/panning.c b/Alc/panning.c
index 2e979049..9f05203f 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -31,8 +31,6 @@
#include "AL/alc.h"
#include "alu.h"
-extern inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels]);
-
void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat elevation, ALfloat ingain, ALfloat gains[MaxChannels])
{
@@ -81,6 +79,19 @@ void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfl
}
}
+void ComputeAmbientGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels])
+{
+ ALuint i;
+
+ 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].HOACoeff[0] * ingain;
+ }
+}
+
void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MaxChannels])
{
ALuint i, j;