aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-01-24 10:38:04 -0800
committerChris Robinson <[email protected]>2009-01-24 10:38:04 -0800
commit778b74cae10e8798e85cffb58a452c7677175778 (patch)
tree73a451bec2de951ab1024daac6f582a40ef34333 /OpenAL32
parent43ee1edd972d528233475f5239690cd2c3efb04c (diff)
Reimplement panning using lookup tables, based on a patch by Christian Borss
This allows speaker positions to be specified by discrete angles around the listener, providing more flexibility and configurability in placement. Additional patches to take advantage of this are forthcoming.
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h6
-rw-r--r--OpenAL32/Include/alu.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 042ab779..de53b072 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -129,6 +129,9 @@ extern char _alDebug[256];
#define LOWPASSFREQCUTOFF (5000)
+#define QUADRANT_NUM 128
+#define LUT_NUM (4 * QUADRANT_NUM)
+
typedef struct {
ALCboolean (*OpenPlayback)(ALCdevice*, const ALCchar*);
@@ -206,6 +209,9 @@ struct ALCcontext_struct
ALint lNumMonoSources;
ALint lNumStereoSources;
+ ALfloat PanningLUT[OUTPUTCHANNELS * LUT_NUM];
+ ALint NumChan;
+
ALCdevice *Device;
const ALCchar *ExtensionList;
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index b14180b2..f307ea01 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -25,6 +25,7 @@ extern ALboolean DuplicateStereo;
__inline ALuint aluBytesFromFormat(ALenum format);
__inline ALuint aluChannelsFromFormat(ALenum format);
+ALvoid aluInitPanning(ALCcontext *Context);
ALvoid aluMixData(ALCcontext *context,ALvoid *buffer,ALsizei size,ALenum format);
#ifdef __cplusplus