diff options
author | Chris Robinson <[email protected]> | 2008-11-14 07:13:59 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-11-14 07:13:59 -0800 |
commit | d72b132c57145bd6cd4c531fe0a8c65b348c2c29 (patch) | |
tree | 910ffeef08d6b278e12da0032867efed2bb58ee7 /Alc | |
parent | 506912aed7a1ae84fbc0407741c85ac2d5e109d2 (diff) |
Add an option to disable specific EFX effect types
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -309,6 +309,37 @@ static void InitAL(void) strcasecmp(str, "yes") == 0 || strcasecmp(str, "on") == 0 || atoi(str) != 0); + + str = GetConfigValue(NULL, "excludefx", ""); + if(str[0]) + { + const struct { + const char *name; + int type; + } EffectList[] = { + { "reverb", REVERB }, + { NULL, 0 } + }; + int n; + size_t len; + const char *next = str; + + do { + str = next; + next = strchr(str, ','); + + if(!str[0] || next == str) + continue; + + len = (next ? ((size_t)(next-str)) : strlen(str)); + for(n = 0;EffectList[n].name;n++) + { + if(len == strlen(EffectList[n].name) && + strncmp(EffectList[n].name, str, len) == 0) + DisabledEffects[EffectList[n].type] = AL_TRUE; + } + } while(next++); + } } } |