aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h5
-rw-r--r--OpenAL32/Include/alu.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 805a6f42..a658227b 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -585,6 +585,10 @@ enum DeviceType {
*/
#define BUFFERSIZE (2048u)
+/* The maximum number of Ambisonics coefficients. For a given order (o), the
+ * size needed will be (o+1)**2, thus zero-order has 1, first-order has 4,
+ * second-order has 9, and third-order has 16. */
+#define MAX_AMBI_COEFFS 16
struct ALCdevice_struct
{
@@ -652,6 +656,7 @@ struct ALCdevice_struct
struct {
enum Channel ChanName;
ALfloat Angle;
+ ALfloat Coeff[MAX_AMBI_COEFFS];
} Speaker[MaxChannels];
ALuint NumSpeakers;
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 55d33988..136025d1 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -202,6 +202,14 @@ inline ALfloat cubic(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALf
ALvoid aluInitPanning(ALCdevice *Device);
/**
+ * ComputeDirectionalGains
+ *
+ * Sets channel gains based on the given source's direction. The direction must
+ * be a 3-component vector no longer than 1 unit.
+ */
+void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfloat ingain, ALfloat gains[MaxChannels]);
+
+/**
* ComputeAngleGains
*
* Sets channel gains based on a given source's angle and its half-width. The