summaryrefslogtreecommitdiffstats
path: root/Alc/effects/reverb.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-06 17:25:47 -0700
committerChris Robinson <[email protected]>2013-10-06 17:25:47 -0700
commit79edd2cf3b46b22d3e6c57aec11b942809f24ff3 (patch)
treeb8d75b8de358eb4ea3c251907936cd7c70b9ac8b /Alc/effects/reverb.c
parent6425480d40e2a1b150c208db0421eabb51fe0624 (diff)
Use a macro for the silence threshold
Diffstat (limited to 'Alc/effects/reverb.c')
-rw-r--r--Alc/effects/reverb.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index 261a1f7f..4c65e0a6 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -575,11 +575,11 @@ static ALvoid ALreverbState_processStandard(ALreverbState *State, ALuint Samples
for(c = 0;c < MaxChannels;c++)
{
ALfloat gain = State->Gain[c];
- if(gain > 0.00001f)
- {
- for(index = 0;index < SamplesToDo;index++)
- SamplesOut[c][index] += gain * out[index][c&3];
- }
+ if(!(gain > GAIN_SILENCE_THRESHOLD))
+ continue;
+
+ for(index = 0;index < SamplesToDo;index++)
+ SamplesOut[c][index] += gain * out[index][c&3];
}
}
@@ -595,15 +595,16 @@ static ALvoid ALreverbState_processEax(ALreverbState *State, ALuint SamplesToDo,
for(c = 0;c < MaxChannels;c++)
{
- ALfloat earlyGain = State->Early.PanGain[c];
- ALfloat lateGain = State->Late.PanGain[c];
+ ALfloat earlyGain, lateGain;
- if(earlyGain > 0.00001f)
+ earlyGain = State->Early.PanGain[c];
+ if(earlyGain > GAIN_SILENCE_THRESHOLD)
{
for(index = 0;index < SamplesToDo;index++)
SamplesOut[c][index] += earlyGain*early[index][c&3];
}
- if(lateGain > 0.00001f)
+ lateGain = State->Late.PanGain[c];
+ if(lateGain > GAIN_SILENCE_THRESHOLD)
{
for(index = 0;index < SamplesToDo;index++)
SamplesOut[c][index] += lateGain*late[index][c&3];