diff options
author | Chris Robinson <[email protected]> | 2011-09-11 08:59:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-11 08:59:47 -0700 |
commit | 6ce420afe36a692a1fc9ec48d5c3d3625509541f (patch) | |
tree | 9d096e0f8dabc0b3599c0a554e56a7eec0a37fc6 /OpenAL32/Include | |
parent | 8028770901f4da6632fdb567ff45fbf7f86f4f6f (diff) |
Use function pointers to set type-specific effect properties
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alEffect.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h index c7b0062a..566458c6 100644 --- a/OpenAL32/Include/alEffect.h +++ b/OpenAL32/Include/alEffect.h @@ -75,10 +75,30 @@ typedef struct ALeffect ALfloat Gain; } Dedicated; + void (*SetParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint val); + void (*SetParamiv)(struct ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals); + void (*SetParamf)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val); + void (*SetParamfv)(struct ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals); + + void (*GetParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *val); + void (*GetParamiv)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals); + void (*GetParamf)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val); + void (*GetParamfv)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals); + // Index to itself ALuint effect; } ALeffect; +#define ALeffect_SetParami(x, c, p, v) ((x)->SetParami((x),(c),(p),(v))) +#define ALeffect_SetParamiv(x, c, p, v) ((x)->SetParamiv((x),(c),(p),(v))) +#define ALeffect_SetParamf(x, c, p, v) ((x)->SetParamf((x),(c),(p),(v))) +#define ALeffect_SetParamfv(x, c, p, v) ((x)->SetParamfv((x),(c),(p),(v))) + +#define ALeffect_GetParami(x, c, p, v) ((x)->GetParami((x),(c),(p),(v))) +#define ALeffect_GetParamiv(x, c, p, v) ((x)->GetParamiv((x),(c),(p),(v))) +#define ALeffect_GetParamf(x, c, p, v) ((x)->GetParamf((x),(c),(p),(v))) +#define ALeffect_GetParamfv(x, c, p, v) ((x)->GetParamfv((x),(c),(p),(v))) + static __inline ALboolean IsReverbEffect(ALenum type) { return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; } |