diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alEffect.h | 7 | ||||
-rw-r--r-- | OpenAL32/alEffect.c | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h index 24f12c5e..5f6723bc 100644 --- a/OpenAL32/Include/alEffect.h +++ b/OpenAL32/Include/alEffect.h @@ -38,6 +38,13 @@ extern "C" { #define AL_REVERB_DECAY_HFLIMIT 0x000D +enum { + REVERB = 0, + MAX_EFFECTS +}; +extern ALboolean DisabledEffects[MAX_EFFECTS]; + + typedef struct ALeffect_struct { // Effect type (AL_EFFECT_NULL, ...) diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 8f52bcaf..939b663f 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -29,6 +29,10 @@ #include "alThunk.h" #include "alError.h" + +ALboolean DisabledEffects[MAX_EFFECTS]; + + static ALeffect *g_EffectList; static ALuint g_EffectCount; @@ -165,8 +169,10 @@ ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue) if(param == AL_EFFECT_TYPE) { - if(iValue == AL_EFFECT_NULL || - iValue == AL_EFFECT_REVERB) + ALboolean isOk = (iValue == AL_EFFECT_NULL || + (iValue == AL_EFFECT_REVERB && !DisabledEffects[REVERB])); + + if(isOk) InitEffectParams(ALEffect, iValue); else alSetError(AL_INVALID_VALUE); |