aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-04-24 21:42:59 -0700
committerChris Robinson <[email protected]>2016-04-24 21:42:59 -0700
commitf0871c8cfcb329e847fd48256fd32f20d2c7e827 (patch)
tree6094609d7c173efa66894705d63d1f018bbf0f63 /OpenAL32
parentfdee577940a4669e9723a16c4c625567694589ec (diff)
Improve radius behavior with scaling of ambisonic coefficients
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index c6b5aba0..76a8a921 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -300,9 +300,10 @@ void aluInitEffectPanning(struct ALeffectslot *slot);
* CalcDirectionCoeffs
*
* Calculates ambisonic coefficients based on a direction vector. The vector
- * must be normalized (unit length).
+ * must be normalized (unit length), and the spread is the angular width of the
+ * sound (0...tau).
*/
-void CalcDirectionCoeffs(const ALfloat dir[3], ALfloat coeffs[MAX_AMBI_COEFFS]);
+void CalcDirectionCoeffs(const ALfloat dir[3], ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS]);
/**
* CalcXYZCoeffs
@@ -310,10 +311,10 @@ void CalcDirectionCoeffs(const ALfloat dir[3], ALfloat coeffs[MAX_AMBI_COEFFS]);
* Same as CalcDirectionCoeffs except the direction is specified as separate x,
* y, and z parameters instead of an array.
*/
-inline void CalcXYZCoeffs(ALfloat x, ALfloat y, ALfloat z, ALfloat coeffs[MAX_AMBI_COEFFS])
+inline void CalcXYZCoeffs(ALfloat x, ALfloat y, ALfloat z, ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS])
{
ALfloat dir[3] = { x, y, z };
- CalcDirectionCoeffs(dir, coeffs);
+ CalcDirectionCoeffs(dir, spread, coeffs);
}
/**
@@ -323,7 +324,7 @@ inline void CalcXYZCoeffs(ALfloat x, ALfloat y, ALfloat z, ALfloat coeffs[MAX_AM
* azimuth and elevation parameters are in radians, going right and up
* respectively.
*/
-void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat coeffs[MAX_AMBI_COEFFS]);
+void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS]);
/**
* ComputeAmbientGains