aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/effects/autowah.c2
-rw-r--r--Alc/effects/chorus.c2
-rw-r--r--Alc/effects/flanger.c2
-rw-r--r--Alc/effects/modulator.c4
-rw-r--r--Alc/effects/reverb.c4
-rw-r--r--Alc/hrtf.c6
-rw-r--r--OpenAL32/Include/alu.h2
-rw-r--r--OpenAL32/alFilter.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/Alc/effects/autowah.c b/Alc/effects/autowah.c
index a444ace3..6770f719 100644
--- a/Alc/effects/autowah.c
+++ b/Alc/effects/autowah.c
@@ -112,7 +112,7 @@ static ALvoid ALautowahState_process(ALautowahState *state, ALuint SamplesToDo,
* ALfilterType_LowPass. However, instead of passing a bandwidth,
* we use the resonance property for Q. This also inlines the call.
*/
- w0 = F_2PI * cutoff / state->Frequency;
+ w0 = F_TAU * cutoff / state->Frequency;
/* FIXME: Resonance controls the resonant peak, or Q. How? Not sure
* that Q = resonance*0.1. */
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index aef12647..7aa5898b 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -134,7 +134,7 @@ static ALvoid ALchorusState_update(ALchorusState *state, ALCdevice *Device, cons
state->lfo_scale = 4.0f / state->lfo_range;
break;
case CWF_Sinusoid:
- state->lfo_scale = F_2PI / state->lfo_range;
+ state->lfo_scale = F_TAU / state->lfo_range;
break;
}
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c
index 1af56102..f6191abd 100644
--- a/Alc/effects/flanger.c
+++ b/Alc/effects/flanger.c
@@ -134,7 +134,7 @@ static ALvoid ALflangerState_update(ALflangerState *state, ALCdevice *Device, co
state->lfo_scale = 4.0f / state->lfo_range;
break;
case FWF_Sinusoid:
- state->lfo_scale = F_2PI / state->lfo_range;
+ state->lfo_scale = F_TAU / state->lfo_range;
break;
}
diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c
index d76fddad..dceb408e 100644
--- a/Alc/effects/modulator.c
+++ b/Alc/effects/modulator.c
@@ -53,7 +53,7 @@ typedef struct ALmodulatorState {
static inline ALfloat Sin(ALuint index)
{
- return sinf(index*(F_2PI/WAVEFORM_FRACONE) - F_PI)*0.5f + 0.5f;
+ return sinf(index*(F_TAU/WAVEFORM_FRACONE) - F_PI)*0.5f + 0.5f;
}
static inline ALfloat Saw(ALuint index)
@@ -139,7 +139,7 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, ALCdevice *Device
if(state->step == 0) state->step = 1;
/* Custom filter coeffs, which match the old version instead of a low-shelf. */
- cw = cosf(F_2PI * Slot->EffectProps.Modulator.HighPassCutoff / Device->Frequency);
+ cw = cosf(F_TAU * Slot->EffectProps.Modulator.HighPassCutoff / Device->Frequency);
a = (2.0f-cw) - sqrtf(powf(2.0f-cw, 2.0f) - 1.0f);
state->Filter.b[0] = a;
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index 9170e1c9..1b9c37d9 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -266,7 +266,7 @@ static inline ALfloat EAXModulation(ALreverbState *State, ALfloat in)
// Calculate the sinus rythm (dependent on modulation time and the
// sampling rate). The center of the sinus is moved to reduce the delay
// of the effect when the time or depth are low.
- sinus = 1.0f - cosf(F_2PI * State->Mod.Index / State->Mod.Range);
+ sinus = 1.0f - cosf(F_TAU * State->Mod.Index / State->Mod.Range);
// The depth determines the range over which to read the input samples
// from, so it must be filtered to reduce the distortion caused by even
@@ -1145,7 +1145,7 @@ static ALvoid ALreverbState_update(ALreverbState *State, ALCdevice *Device, cons
Slot->EffectProps.Reverb.AirAbsorptionGainHF,
Slot->EffectProps.Reverb.DecayTime);
- cw = cosf(F_2PI * hfscale);
+ cw = cosf(F_TAU * hfscale);
// Update the late lines.
UpdateLateLines(Slot->EffectProps.Reverb.Gain, Slot->EffectProps.Reverb.LateReverbGain,
x, Slot->EffectProps.Reverb.Density, Slot->EffectProps.Reverb.DecayTime,
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 9425c696..ca372244 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -82,7 +82,7 @@ static void CalcEvIndices(ALuint evcount, ALfloat ev, ALuint *evidx, ALfloat *ev
*/
static void CalcAzIndices(ALuint azcount, ALfloat az, ALuint *azidx, ALfloat *azmu)
{
- az = (F_2PI + az) * azcount / F_2PI;
+ az = (F_TAU + az) * azcount / F_TAU;
azidx[0] = fastf2u(az) % azcount;
azidx[1] = (azidx[0] + 1) % azcount;
*azmu = az - floorf(az);
@@ -359,8 +359,8 @@ void GetBFormatHrtfCoeffs(const struct Hrtf *Hrtf, const ALuint num_chans, ALflo
lidx = evoffset + azi_idx;
ridx = evoffset + ((azcount-azi_idx) % azcount);
- az = (ALfloat)azi_idx / (ALfloat)azcount * F_2PI;
- if(az > F_PI) az -= F_2PI;
+ az = (ALfloat)azi_idx / (ALfloat)azcount * F_TAU;
+ if(az > F_PI) az -= F_TAU;
x = cosf(-az) * cosf(elev);
y = sinf(-az) * cosf(elev);
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 50cde1bf..e167979b 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -20,7 +20,7 @@
#define F_PI (3.14159265358979323846f)
#define F_PI_2 (1.57079632679489661923f)
-#define F_2PI (6.28318530717958647692f)
+#define F_TAU (6.28318530717958647692f)
#ifndef FLT_EPSILON
#define FLT_EPSILON (1.19209290e-07f)
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 72eff9bb..ccf256e1 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -344,7 +344,7 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g
// Limit gain to -100dB
gain = maxf(gain, 0.00001f);
- w0 = F_2PI * freq_mult;
+ w0 = F_TAU * freq_mult;
/* Calculate filter coefficients depending on filter type */
switch(type)