aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c2
-rw-r--r--Alc/alcReverb.c2
-rw-r--r--Alc/hrtf.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 0697e943..c02b0fdc 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -717,7 +717,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
// the listener. This prevents +0 and -0 Z from producing
// inconsistent panning.
ev = aluAsin(Position[1]);
- az = atan2(Position[0], -Position[2]*ZScale);
+ az = aluAtan2(Position[0], -Position[2]*ZScale);
}
// Check to see if the HRIR is already moving.
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index 80439669..92a82a51 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -757,7 +757,7 @@ static __inline ALfloat CalcDecayCoeff(ALfloat length, ALfloat decayTime)
// reaches -60 dB.
static __inline ALfloat CalcDecayLength(ALfloat coeff, ALfloat decayTime)
{
- return log10(coeff) * decayTime / -3.0f/*log10(0.001)*/;
+ return aluLog10(coeff) * decayTime / aluLog10(0.001)/*-60 dB*/;
}
// Calculate the high frequency parameter for the I3DL2 coefficient
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 9decb545..d8d65097 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -85,7 +85,7 @@ static void CalcAzIndices(ALuint evidx, ALfloat az, ALuint *azidx, ALfloat *azmu
az = (F_PI*2.0f + az) * azCount[evidx] / (F_PI*2.0f);
azidx[0] = (ALuint)az % azCount[evidx];
azidx[1] = (azidx[0] + 1) % azCount[evidx];
- *azmu = az - floor(az);
+ *azmu = az - aluFloor(az);
}
// Calculates the normalized HRTF transition factor (delta) from the changes
@@ -99,7 +99,7 @@ ALfloat CalcHrtfDelta(ALfloat oldGain, ALfloat newGain, const ALfloat olddir[3],
// Calculate the normalized dB gain change.
newGain = maxf(newGain, 0.0001f);
oldGain = maxf(oldGain, 0.0001f);
- gainChange = aluFabs(log10(newGain / oldGain) / log10(0.0001f));
+ gainChange = aluFabs(aluLog10(newGain / oldGain) / aluLog10(0.0001f));
// Calculate the normalized listener to source angle change when there is
// enough gain to notice it.
@@ -231,7 +231,7 @@ ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat a
ridx[3] = evOffset[evidx[1]] + ((azCount[evidx[1]]-azidx[1]) % azCount[evidx[1]]);
// Calculate the stepping parameters.
- delta = maxf(floor(delta*(Hrtf->sampleRate*0.015f) + 0.5f), 1.0f);
+ delta = maxf(aluFloor(delta*(Hrtf->sampleRate*0.015f) + 0.5f), 1.0f);
step = 1.0f / delta;
// Calculate the normalized and attenuated target HRIR coefficients using