Merge pull request #197 from Raulshc/Modulator

EFX: Modulator fixes
This commit is contained in:
kcat
2018-05-31 19:38:42 -07:00
committed by GitHub
+3 -3
View File
@@ -63,17 +63,17 @@ DEFINE_ALEFFECTSTATE_VTABLE(ALmodulatorState);
static inline ALfloat Sin(ALsizei index)
{
return sinf(index*(F_TAU/WAVEFORM_FRACONE) - F_PI)*0.5f + 0.5f;
return sinf(index * (F_TAU / WAVEFORM_FRACONE));
}
static inline ALfloat Saw(ALsizei index)
{
return (ALfloat)index / WAVEFORM_FRACONE;
return index*(2.0f/WAVEFORM_FRACONE) - 1.0f;
}
static inline ALfloat Square(ALsizei index)
{
return (ALfloat)((index >> (WAVEFORM_FRACBITS - 1)) & 1);
return ((index>>(WAVEFORM_FRACBITS-1))&1)*2.0f - 1.0f;
}
#define DECL_TEMPLATE(func) \