aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 402c3181..326cde62 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -276,25 +276,21 @@ void aluInitEffectPanning(struct ALeffectslot *slot);
void CalcDirectionCoeffs(const ALfloat dir[3], ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS]);
/**
- * CalcXYZCoeffs
- *
- * 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 spread, ALfloat coeffs[MAX_AMBI_COEFFS])
-{
- ALfloat dir[3] = { x, y, z };
- CalcDirectionCoeffs(dir, spread, coeffs);
-}
-
-/**
* CalcAngleCoeffs
*
* Calculates ambisonic coefficients based on azimuth and elevation. The
* azimuth and elevation parameters are in radians, going right and up
* respectively.
*/
-void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS]);
+inline void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS])
+{
+ ALfloat dir[3] = {
+ sinf(azimuth) * cosf(elevation),
+ sinf(elevation),
+ -cosf(azimuth) * cosf(elevation)
+ };
+ CalcDirectionCoeffs(dir, spread, coeffs);
+}
/**
* CalcAnglePairwiseCoeffs