aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-22 19:18:01 -0800
committerChris Robinson <[email protected]>2017-02-22 19:18:01 -0800
commit0ce4c9b8fa90df6111fb81debf583b0fc9200063 (patch)
treee81c1aee27782809d49392dceb2e51e4f56767a3 /Alc/ALu.c
parentd04cc28f33c5a21273fc42c023b41dbcfa89632b (diff)
Rename stereo-panning option to stereo-encoding
Also rename the 'paired' value to 'panpot', and make it the default.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d2c2ec19..bc48dd59 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -683,8 +683,8 @@ static void CalcNonAttnSourceParams(ALvoice *voice, const struct ALsourceProps *
/* 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.5f;
- voice->Direct.Params[c].Gains.Target[0] = coeffs[0] * DryGain;
- voice->Direct.Params[c].Gains.Target[1] = (1.0f-coeffs[0]) * DryGain;
+ voice->Direct.Params[c].Gains.Target[0] = sqrtf(coeffs[0]) * DryGain;
+ voice->Direct.Params[c].Gains.Target[1] = sqrtf(1.0f-coeffs[0]) * DryGain;
for(j = 2;j < MAX_OUTPUT_CHANNELS;j++)
voice->Direct.Params[c].Gains.Target[j] = 0.0f;
@@ -1176,8 +1176,8 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALsourceProps *pro
/* Clamp X so it remains within 30 degrees of 0 or 180 degree azimuth. */
ALfloat x = -dir[0] * (0.5f * (cosf(spread*0.5f) + 1.0f));
x = clampf(x, -0.5f, 0.5f) + 0.5f;
- voice->Direct.Params[0].Gains.Target[0] = x * DryGain;
- voice->Direct.Params[0].Gains.Target[1] = (1.0f-x) * DryGain;
+ voice->Direct.Params[0].Gains.Target[0] = sqrtf(x) * DryGain;
+ voice->Direct.Params[0].Gains.Target[1] = sqrtf(1.0f-x) * DryGain;
for(i = 2;i < MAX_OUTPUT_CHANNELS;i++)
voice->Direct.Params[0].Gains.Target[i] = 0.0f;