aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/panning.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/panning.c')
-rw-r--r--Alc/panning.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/Alc/panning.c b/Alc/panning.c
index dccb495e..c4eb3f82 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -27,8 +27,7 @@
#include <assert.h>
#include "alMain.h"
-#include "AL/al.h"
-#include "AL/alc.h"
+#include "alAuxEffectSlot.h"
#include "alu.h"
#include "bool.h"
@@ -569,3 +568,22 @@ ALvoid aluInitPanning(ALCdevice *device)
&device->NumChannels, AL_TRUE);
device->AmbiScale = ambiscale;
}
+
+void aluInitEffectPanning(ALeffectslot *slot)
+{
+ static const ChannelMap FirstOrderN3D[4] = {
+ { BFormatW, { 1.0f, 0.0f, 0.0f, 0.0f } },
+ { BFormatY, { 0.0f, 1.0f, 0.0f, 0.0f } },
+ { BFormatZ, { 0.0f, 0.0f, 1.0f, 0.0f } },
+ { BFormatX, { 0.0f, 0.0f, 0.0f, 1.0f } },
+ };
+ static const enum Channel AmbiChannels[MAX_OUTPUT_CHANNELS] = {
+ BFormatW, BFormatY, BFormatZ, BFormatX, InvalidChannel
+ };
+
+ memset(slot->AmbiCoeffs, 0, sizeof(slot->AmbiCoeffs));
+ slot->NumChannels = 0;
+
+ SetChannelMap(AmbiChannels, slot->AmbiCoeffs, FirstOrderN3D, COUNTOF(FirstOrderN3D),
+ &slot->NumChannels, AL_FALSE);
+}