aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-03-24 11:11:17 -0700
committerChris Robinson <[email protected]>2016-03-24 11:11:17 -0700
commitb0acfa17634281bf95f423d903aac5dfc23f3697 (patch)
treefd9b9c2fb8c2fe0c543d3643d1b8ae0f4e5150e7 /Alc/ALu.c
parent3646cf817cae87bba2ba45b8414e3e07ac87c7b4 (diff)
Add a cast and a couple float type fixes
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 206aceda..cdb75e6a 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -678,7 +678,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
{
/* Clamp X so it remains within 30 degrees of 0 or 180 degree azimuth. */
ALfloat x = sinf(chans[c].angle) * cosf(chans[c].elevation);
- coeffs[0] = clampf(-x, -0.5f, 0.5f) + 0.5;
+ coeffs[0] = clampf(-x, -0.5f, 0.5f) + 0.5f;
voice->Direct.Gains[c].Target[0] = coeffs[0] * DryGain;
voice->Direct.Gains[c].Target[1] = (1.0f-coeffs[0]) * DryGain;
for(j = 2;j < MAX_OUTPUT_CHANNELS;j++)
@@ -1179,7 +1179,7 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte
if(Device->Render_Mode == StereoPair)
{
/* Clamp X so it remains within 30 degrees of 0 or 180 degree azimuth. */
- coeffs[0] = clampf(-dir[0], -0.5f, 0.5f) + 0.5;
+ coeffs[0] = clampf(-dir[0], -0.5f, 0.5f) + 0.5f;
voice->Direct.Gains[0].Target[0] = coeffs[0] * DryGain;
voice->Direct.Gains[0].Target[1] = (1.0f-coeffs[0]) * DryGain;
for(i = 2;i < MAX_OUTPUT_CHANNELS;i++)