aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-08 16:54:45 -0800
committerChris Robinson <[email protected]>2013-11-08 16:54:45 -0800
commita603dd55ffb9ea3e863ae3f15b1346e06035438f (patch)
tree8379563c4facaf0404d51762718ffac52e3ddf06 /Alc/effects
parent9228d133335811f9d27648454ebad1ece0493e7c (diff)
Rename lfo_coeff to lfo_scale
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/chorus.c16
-rw-r--r--Alc/effects/flanger.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index a1c0ccf3..cced4c23 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -38,7 +38,7 @@ typedef struct ALchorusState {
ALuint BufferLength;
ALuint offset;
ALuint lfo_range;
- ALfloat lfo_coeff;
+ ALfloat lfo_scale;
ALint lfo_disp;
/* Gains for left and right sides */
@@ -111,7 +111,7 @@ static ALvoid ALchorusState_update(ALchorusState *state, ALCdevice *Device, cons
rate = Slot->EffectProps.Chorus.Rate;
if(!(rate > 0.0f))
{
- state->lfo_coeff = 0.0f;
+ state->lfo_scale = 0.0f;
state->lfo_range = 1;
state->lfo_disp = 0;
}
@@ -122,10 +122,10 @@ static ALvoid ALchorusState_update(ALchorusState *state, ALCdevice *Device, cons
switch(state->waveform)
{
case AL_CHORUS_WAVEFORM_TRIANGLE:
- state->lfo_coeff = 1.0f / state->lfo_range;
+ state->lfo_scale = 4.0f / state->lfo_range;
break;
case AL_CHORUS_WAVEFORM_SINUSOID:
- state->lfo_coeff = F_2PI / state->lfo_range;
+ state->lfo_scale = F_2PI / state->lfo_range;
break;
}
@@ -138,12 +138,12 @@ static inline void Triangle(ALint *delay_left, ALint *delay_right, ALuint offset
{
ALfloat lfo_value;
- lfo_value = 2.0f - fabsf(2.0f - state->lfo_coeff*(offset%state->lfo_range)*4.0f);
+ lfo_value = 2.0f - fabsf(2.0f - state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_left = fastf2i(lfo_value) + state->delay;
offset += state->lfo_disp;
- lfo_value = 2.0f - fabsf(2.0f - state->lfo_coeff*(offset%state->lfo_range)*4.0f);
+ lfo_value = 2.0f - fabsf(2.0f - state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_right = fastf2i(lfo_value) + state->delay;
}
@@ -152,12 +152,12 @@ static inline void Sinusoid(ALint *delay_left, ALint *delay_right, ALuint offset
{
ALfloat lfo_value;
- lfo_value = 1.0f + sinf(state->lfo_coeff*(offset%state->lfo_range));
+ lfo_value = 1.0f + sinf(state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_left = fastf2i(lfo_value) + state->delay;
offset += state->lfo_disp;
- lfo_value = 1.0f + sinf(state->lfo_coeff*(offset%state->lfo_range));
+ lfo_value = 1.0f + sinf(state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_right = fastf2i(lfo_value) + state->delay;
}
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c
index 472a91a7..c5df76de 100644
--- a/Alc/effects/flanger.c
+++ b/Alc/effects/flanger.c
@@ -38,7 +38,7 @@ typedef struct ALflangerState {
ALuint BufferLength;
ALuint offset;
ALuint lfo_range;
- ALfloat lfo_coeff;
+ ALfloat lfo_scale;
ALint lfo_disp;
/* Gains for left and right sides */
@@ -111,7 +111,7 @@ static ALvoid ALflangerState_update(ALflangerState *state, ALCdevice *Device, co
rate = Slot->EffectProps.Flanger.Rate;
if(!(rate > 0.0f))
{
- state->lfo_coeff = 0.0f;
+ state->lfo_scale = 0.0f;
state->lfo_range = 1;
state->lfo_disp = 0;
}
@@ -122,10 +122,10 @@ static ALvoid ALflangerState_update(ALflangerState *state, ALCdevice *Device, co
switch(state->waveform)
{
case AL_FLANGER_WAVEFORM_TRIANGLE:
- state->lfo_coeff = 1.0f / state->lfo_range;
+ state->lfo_scale = 4.0f / state->lfo_range;
break;
case AL_FLANGER_WAVEFORM_SINUSOID:
- state->lfo_coeff = F_2PI / state->lfo_range;
+ state->lfo_scale = F_2PI / state->lfo_range;
break;
}
@@ -138,12 +138,12 @@ static inline void Triangle(ALint *delay_left, ALint *delay_right, ALuint offset
{
ALfloat lfo_value;
- lfo_value = 2.0f - fabsf(2.0f - state->lfo_coeff*(offset%state->lfo_range)*4.0f);
+ lfo_value = 2.0f - fabsf(2.0f - state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_left = fastf2i(lfo_value) + state->delay;
offset += state->lfo_disp;
- lfo_value = 2.0f - fabsf(2.0f - state->lfo_coeff*(offset%state->lfo_range)*4.0f);
+ lfo_value = 2.0f - fabsf(2.0f - state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_right = fastf2i(lfo_value) + state->delay;
}
@@ -152,12 +152,12 @@ static inline void Sinusoid(ALint *delay_left, ALint *delay_right, ALuint offset
{
ALfloat lfo_value;
- lfo_value = 1.0f + sinf(state->lfo_coeff*(offset%state->lfo_range));
+ lfo_value = 1.0f + sinf(state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_left = fastf2i(lfo_value) + state->delay;
offset += state->lfo_disp;
- lfo_value = 1.0f + sinf(state->lfo_coeff*(offset%state->lfo_range));
+ lfo_value = 1.0f + sinf(state->lfo_scale*(offset%state->lfo_range));
lfo_value *= state->depth * state->delay;
*delay_right = fastf2i(lfo_value) + state->delay;
}