diff options
author | Chris Robinson <[email protected]> | 2013-10-08 16:31:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-10-08 16:31:23 -0700 |
commit | a421e515befd1916d57e7668ee98c1a5dfe63dab (patch) | |
tree | 68d69e41030ccfec34ac89175edec66e99b7660b /Alc/effects/modulator.c | |
parent | 11365b42c7fedaef61d7123c390c429260eae52f (diff) |
Use a helper macro for pi*2
Diffstat (limited to 'Alc/effects/modulator.c')
-rw-r--r-- | Alc/effects/modulator.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c index 4fdd1261..17ca7e17 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_PI*2.0f / WAVEFORM_FRACONE) - F_PI)*0.5f + 0.5f; + return sinf(index*(F_2PI/WAVEFORM_FRACONE) - F_PI)*0.5f + 0.5f; } static inline ALfloat Saw(ALuint index) @@ -139,8 +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_PI*2.0f * Slot->EffectProps.Modulator.HighPassCutoff / - Device->Frequency); + cw = cosf(F_2PI * Slot->EffectProps.Modulator.HighPassCutoff / Device->Frequency); a = (2.0f-cw) - sqrtf(powf(2.0f-cw, 2.0f) - 1.0f); state->Filter.b[0] = a; |