aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-01-24 13:29:33 -0800
committerChris Robinson <[email protected]>2012-01-24 13:29:33 -0800
commit8d07bc41c963fd8959045cac534068fa5db905ee (patch)
tree17640a94e2209a25c7b2cd620e5d3aa4ceeffe78 /OpenAL32/alEffect.c
parent86ef115e21cf93d08b2273278b25cae702a86024 (diff)
Some cleanups for the reverb list
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r--OpenAL32/alEffect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index ff7195aa..749c7798 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -1347,8 +1347,9 @@ static const struct {
DECL(DRUGGED),
DECL(DIZZY),
DECL(PSYCHOTIC),
- { "", EFX_REVERB_PRESET_GENERIC }
};
+#undef DECL
+static const ALsizei reverblistsize = sizeof(reverblist)/sizeof(reverblist[0]);
ALvoid GetReverbEffect(const char *name, ALeffect *effect)
{
@@ -1360,7 +1361,7 @@ ALvoid GetReverbEffect(const char *name, ALeffect *effect)
InitEffectParams(effect, AL_EFFECT_REVERB);
else
InitEffectParams(effect, AL_EFFECT_NULL);
- for(i = 0;reverblist[i].name[0];i++)
+ for(i = 0;i < reverblistsize;i++)
{
const EFXEAXREVERBPROPERTIES *props;
@@ -1398,6 +1399,6 @@ ALvoid GetReverbEffect(const char *name, ALeffect *effect)
effect->Reverb.DecayHFLimit = props->iDecayHFLimit;
break;
}
- if(!reverblist[i].name[0])
+ if(i == reverblistsize)
WARN("Reverb preset '%s' not found\n", name);
}