diff options
author | Chris Robinson <[email protected]> | 2013-03-13 21:53:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-03-13 21:53:42 -0700 |
commit | 991aba286f32e8760811bc061b15c5102c66b3e1 (patch) | |
tree | 695e0a2f0ae7f5df1a335dcc29ac2402d17dbed4 /Alc/alcDedicated.c | |
parent | a3846ba53b27ea58f14d61bcd1da5050913e6f19 (diff) |
Move the effect-specific get/set methods to where the effect is implemented
Diffstat (limited to 'Alc/alcDedicated.c')
-rw-r--r-- | Alc/alcDedicated.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Alc/alcDedicated.c b/Alc/alcDedicated.c index 1d2cbc42..d73d8959 100644 --- a/Alc/alcDedicated.c +++ b/Alc/alcDedicated.c @@ -98,3 +98,54 @@ ALeffectState *DedicatedCreate(void) return &state->state; } + +void ded_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val) +{ (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); } +void ded_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals) +{ + ded_SetParami(effect, context, param, vals[0]); +} +void ded_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val) +{ + switch(param) + { + case AL_DEDICATED_GAIN: + if(val >= 0.0f && isfinite(val)) + effect->Dedicated.Gain = val; + else + alSetError(context, AL_INVALID_VALUE); + break; + + default: + alSetError(context, AL_INVALID_ENUM); + break; + } +} +void ded_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals) +{ + ded_SetParamf(effect, context, param, vals[0]); +} + +void ded_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val) +{ (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); } +void ded_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals) +{ + ded_GetParami(effect, context, param, vals); +} +void ded_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val) +{ + switch(param) + { + case AL_DEDICATED_GAIN: + *val = effect->Dedicated.Gain; + break; + + default: + alSetError(context, AL_INVALID_ENUM); + break; + } +} +void ded_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals) +{ + ded_GetParamf(effect, context, param, vals); +} |