29 extern ALboolean DisabledEffects[MAX_EFFECTS];
31 extern ALfloat ReverbBoost;
38 #define EFFECTLIST_SIZE 14 39 extern const struct EffectList EffectList[EFFECTLIST_SIZE];
42 struct ALeffectVtable {
43 void (*
const setParami)(
struct ALeffect *effect, ALCcontext *context, ALenum param, ALint val);
44 void (*
const setParamiv)(
struct ALeffect *effect, ALCcontext *context, ALenum param,
const ALint *vals);
45 void (*
const setParamf)(
struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val);
46 void (*
const setParamfv)(
struct ALeffect *effect, ALCcontext *context, ALenum param,
const ALfloat *vals);
48 void (*
const getParami)(
const struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *val);
49 void (*
const getParamiv)(
const struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals);
50 void (*
const getParamf)(
const struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val);
51 void (*
const getParamfv)(
const struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals);
54 #define DEFINE_ALEFFECT_VTABLE(T) \ 55 const struct ALeffectVtable T##_vtable = { \ 56 T##_setParami, T##_setParamiv, \ 57 T##_setParamf, T##_setParamfv, \ 58 T##_getParami, T##_getParamiv, \ 59 T##_getParamf, T##_getParamfv, \ 62 extern const struct ALeffectVtable ALeaxreverb_vtable;
63 extern const struct ALeffectVtable ALreverb_vtable;
64 extern const struct ALeffectVtable ALautowah_vtable;
65 extern const struct ALeffectVtable ALchorus_vtable;
66 extern const struct ALeffectVtable ALcompressor_vtable;
67 extern const struct ALeffectVtable ALdistortion_vtable;
68 extern const struct ALeffectVtable ALecho_vtable;
69 extern const struct ALeffectVtable ALequalizer_vtable;
70 extern const struct ALeffectVtable ALflanger_vtable;
71 extern const struct ALeffectVtable ALfshifter_vtable;
72 extern const struct ALeffectVtable ALmodulator_vtable;
73 extern const struct ALeffectVtable ALnull_vtable;
74 extern const struct ALeffectVtable ALpshifter_vtable;
75 extern const struct ALeffectVtable ALdedicated_vtable;
78 typedef union ALeffectProps {
87 ALfloat ReflectionsGain;
88 ALfloat ReflectionsDelay;
89 ALfloat LateReverbGain;
90 ALfloat LateReverbDelay;
91 ALfloat AirAbsorptionGainHF;
92 ALfloat RoomRolloffFactor;
93 ALboolean DecayHFLimit;
98 ALfloat ReflectionsPan[3];
99 ALfloat LateReverbPan[3];
102 ALfloat ModulationTime;
103 ALfloat ModulationDepth;
131 ALfloat LowpassCutoff;
162 ALint RightDirection;
167 ALfloat HighPassCutoff;
181 typedef struct ALeffect {
187 const struct ALeffectVtable *vtab;
192 #define ALeffect_setParami(o, c, p, v) ((o)->vtab->setParami(o, c, p, v)) 193 #define ALeffect_setParamf(o, c, p, v) ((o)->vtab->setParamf(o, c, p, v)) 194 #define ALeffect_setParamiv(o, c, p, v) ((o)->vtab->setParamiv(o, c, p, v)) 195 #define ALeffect_setParamfv(o, c, p, v) ((o)->vtab->setParamfv(o, c, p, v)) 196 #define ALeffect_getParami(o, c, p, v) ((o)->vtab->getParami(o, c, p, v)) 197 #define ALeffect_getParamf(o, c, p, v) ((o)->vtab->getParamf(o, c, p, v)) 198 #define ALeffect_getParamiv(o, c, p, v) ((o)->vtab->getParamiv(o, c, p, v)) 199 #define ALeffect_getParamfv(o, c, p, v) ((o)->vtab->getParamfv(o, c, p, v)) 201 inline ALboolean IsReverbEffect(ALenum type)
202 {
return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
204 void InitEffect(ALeffect *effect);
205 void ReleaseALEffects(ALCdevice *device);
207 void LoadReverbPreset(
const char *name, ALeffect *effect);