aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/echo.c2
-rw-r--r--Alc/effects/equalizer.c8
-rw-r--r--Alc/effects/reverb.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c
index 3ad1e975..4a11d811 100644
--- a/Alc/effects/echo.c
+++ b/Alc/effects/echo.c
@@ -126,7 +126,7 @@ static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, co
state->FeedGain = props->Echo.Feedback;
- gain = minf(1.0f - props->Echo.Damping, 0.01f);
+ gain = minf(1.0f - props->Echo.Damping, 0.0625f); /* Limit -24dB */
ALfilterState_setParams(&state->Filter, ALfilterType_HighShelf,
gain, LOWPASSFREQREF/frequency,
calc_rcpQ_from_slope(gain, 0.75f));
diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c
index 13826a3b..36683d79 100644
--- a/Alc/effects/equalizer.c
+++ b/Alc/effects/equalizer.c
@@ -138,7 +138,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice *
* filters' gain is for the reference frequency, which is the centerpoint
* of the transition band.
*/
- gain = sqrtf(props->Equalizer.LowGain);
+ gain = maxf(sqrtf(props->Equalizer.LowGain), 0.0625f); /* Limit -24dB */
freq_mult = props->Equalizer.LowCutoff/frequency;
ALfilterState_setParams(&state->filter[0][0], ALfilterType_LowShelf,
gain, freq_mult, calc_rcpQ_from_slope(gain, 0.75f)
@@ -153,7 +153,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice *
state->filter[0][i].a2 = state->filter[0][0].a2;
}
- gain = props->Equalizer.Mid1Gain;
+ gain = maxf(props->Equalizer.Mid1Gain, 0.0625f);
freq_mult = props->Equalizer.Mid1Center/frequency;
ALfilterState_setParams(&state->filter[1][0], ALfilterType_Peaking,
gain, freq_mult, calc_rcpQ_from_bandwidth(
@@ -169,7 +169,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice *
state->filter[1][i].a2 = state->filter[1][0].a2;
}
- gain = props->Equalizer.Mid2Gain;
+ gain = maxf(props->Equalizer.Mid2Gain, 0.0625f);
freq_mult = props->Equalizer.Mid2Center/frequency;
ALfilterState_setParams(&state->filter[2][0], ALfilterType_Peaking,
gain, freq_mult, calc_rcpQ_from_bandwidth(
@@ -185,7 +185,7 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice *
state->filter[2][i].a2 = state->filter[2][0].a2;
}
- gain = sqrtf(props->Equalizer.HighGain);
+ gain = maxf(sqrtf(props->Equalizer.HighGain), 0.0625f);
freq_mult = props->Equalizer.HighCutoff/frequency;
ALfilterState_setParams(&state->filter[3][0], ALfilterType_HighShelf,
gain, freq_mult, calc_rcpQ_from_slope(gain, 0.75f)
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index 456b25dc..afae2943 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -1089,11 +1089,11 @@ static ALvoid ALreverbState_update(ALreverbState *State, const ALCdevice *Device
// Calculate the master filters
hfscale = props->Reverb.HFReference / frequency;
- gainhf = maxf(props->Reverb.GainHF, 0.0001f);
+ gainhf = maxf(props->Reverb.GainHF, 0.0625f); /* Limit -24dB */
ALfilterState_setParams(&State->Filter[0].Lp, ALfilterType_HighShelf,
gainhf, hfscale, calc_rcpQ_from_slope(gainhf, 0.75f));
lfscale = props->Reverb.LFReference / frequency;
- gainlf = maxf(props->Reverb.GainLF, 0.0001f);
+ gainlf = maxf(props->Reverb.GainLF, 0.0625f);
ALfilterState_setParams(&State->Filter[0].Hp, ALfilterType_LowShelf,
gainlf, lfscale, calc_rcpQ_from_slope(gainlf, 0.75f));
for(i = 1;i < 4;i++)