aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-11-07 06:15:29 -0800
committerChris Robinson <[email protected]>2015-11-07 06:15:29 -0800
commit91258cc19221e08bac88b42fc2d60dbbf35997dc (patch)
tree78aa9885f9a5c6329b7d0aa3a36e8c1f0cefe53e
parentec7b21cd14f2ef64594cb66066d3217c4892f4eb (diff)
Simplify reverb panning rotations
-rw-r--r--Alc/effects/reverb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index 87c1e8cf..e1013309 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -1088,8 +1088,8 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection
* instead of
* -135 -> 0 -> +135 */
float offset, naz, nev;
- naz = EarlyPanAngles[i] + (modff(((az-EarlyPanAngles[i])*length + F_PI + F_TAU)/F_TAU, &offset)*F_TAU) - F_PI;
- nev = (modff(((ev )*length + F_PI + F_TAU)/F_TAU, &offset)*F_TAU) - F_PI;
+ naz = EarlyPanAngles[i] + (modff((az-EarlyPanAngles[i])*length/F_TAU + 1.5f, &offset)-0.5f)*F_TAU;
+ nev = (modff((ev )*length/F_TAU + 1.5f, &offset)-0.5f)*F_TAU;
ComputeAngleGains(Device, naz, nev, Gain, State->Early.PanGain[i]);
}
}
@@ -1109,8 +1109,8 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection
for(i = 0;i < 4;i++)
{
float offset, naz, nev;
- naz = LatePanAngles[i] + (modff(((az-LatePanAngles[i])*length + F_PI + F_TAU)/F_TAU, &offset)*F_TAU) - F_PI;
- nev = (modff(((ev )*length + F_PI + F_TAU)/F_TAU, &offset)*F_TAU) - F_PI;
+ naz = LatePanAngles[i] + (modff((az-LatePanAngles[i])*length/F_TAU + 1.5f, &offset)-0.5f)*F_TAU;
+ nev = (modff((ev )*length/F_TAU + 1.5f, &offset)-0.5f)*F_TAU;
ComputeAngleGains(Device, naz, nev, Gain, State->Late.PanGain[i]);
}
}