diff options
author | Chris Robinson <[email protected]> | 2007-12-18 18:15:52 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-18 18:15:52 -0800 |
commit | 7f55372727fdc89931b83f3bb360ce39c32e971e (patch) | |
tree | 3711c876d0abadb53ba32721509901543728236d /OpenAL32/alEffect.c | |
parent | 919b8c5bd1ff52afee01712010a1c7dd670ddbf8 (diff) |
Implement AL_EFFECT_TYPE property
Only the null effect type is accepted, right now
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r-- | OpenAL32/alEffect.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 1faca089..ab24e624 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -153,15 +153,22 @@ AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue) { ALCcontext *Context; - (void)iValue; - Context = alcGetCurrentContext(); SuspendContext(Context); if (alIsEffect(effect)) { + ALeffect *ALEffect = (ALeffect*)ALTHUNK_LOOKUPENTRY(effect); + switch(param) { + case AL_EFFECT_TYPE: + if(iValue == AL_EFFECT_NULL) + InitEffectParams(ALEffect, iValue); + else + alSetError(AL_INVALID_VALUE); + break; + default: alSetError(AL_INVALID_ENUM); break; @@ -177,8 +184,6 @@ AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValue { ALCcontext *Context; - (void)piValues; - Context = alcGetCurrentContext(); SuspendContext(Context); @@ -186,6 +191,10 @@ AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValue { switch(param) { + case AL_EFFECT_TYPE: + alEffecti(effect, param, piValues[0]); + break; + default: alSetError(AL_INVALID_ENUM); break; @@ -249,15 +258,19 @@ AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piVal { ALCcontext *Context; - (void)piValue; - Context = alcGetCurrentContext(); SuspendContext(Context); if (alIsEffect(effect)) { + ALeffect *ALEffect = (ALeffect*)ALTHUNK_LOOKUPENTRY(effect); + switch(param) { + case AL_EFFECT_TYPE: + *piValue = ALEffect->type; + break; + default: alSetError(AL_INVALID_ENUM); break; @@ -273,8 +286,6 @@ AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piVa { ALCcontext *Context; - (void)piValues; - Context = alcGetCurrentContext(); SuspendContext(Context); @@ -282,6 +293,10 @@ AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piVa { switch(param) { + case AL_EFFECT_TYPE: + alGetEffecti(effect, param, piValues); + break; + default: alSetError(AL_INVALID_ENUM); break; |