26 extern ALboolean DisabledEffects
[MAX_EFFECTS
];
28 extern ALfloat ReverbBoost
;
35 #define EFFECTLIST_SIZE 11
36 extern const struct EffectList EffectList
[EFFECTLIST_SIZE
];
39 struct ALeffectVtable
{
40 void (*const setParami
)(struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
);
41 void (*const setParamiv
)(struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
);
42 void (*const setParamf
)(struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
);
43 void (*const setParamfv
)(struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
);
45 void (*const getParami
)(const struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
);
46 void (*const getParamiv
)(const struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
);
47 void (*const getParamf
)(const struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
);
48 void (*const getParamfv
)(const struct ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
);
51 #define DEFINE_ALEFFECT_VTABLE(T) \
52 const struct ALeffectVtable T##_vtable = { \
53 T##_setParami, T##_setParamiv, \
54 T##_setParamf, T##_setParamfv, \
55 T##_getParami, T##_getParamiv, \
56 T##_getParamf, T##_getParamfv, \
59 extern const struct ALeffectVtable ALeaxreverb_vtable
;
60 extern const struct ALeffectVtable ALreverb_vtable
;
61 extern const struct ALeffectVtable ALchorus_vtable
;
62 extern const struct ALeffectVtable ALcompressor_vtable
;
63 extern const struct ALeffectVtable ALdistortion_vtable
;
64 extern const struct ALeffectVtable ALecho_vtable
;
65 extern const struct ALeffectVtable ALequalizer_vtable
;
66 extern const struct ALeffectVtable ALflanger_vtable
;
67 extern const struct ALeffectVtable ALmodulator_vtable
;
68 extern const struct ALeffectVtable ALnull_vtable
;
69 extern const struct ALeffectVtable ALdedicated_vtable
;
72 typedef union ALeffectProps
{
74 // Shared Reverb Properties
81 ALfloat ReflectionsGain
;
82 ALfloat ReflectionsDelay
;
83 ALfloat LateReverbGain
;
84 ALfloat LateReverbDelay
;
85 ALfloat AirAbsorptionGainHF
;
86 ALfloat RoomRolloffFactor
;
87 ALboolean DecayHFLimit
;
89 // Additional EAX Reverb Properties
92 ALfloat ReflectionsPan
[3];
93 ALfloat LateReverbPan
[3];
96 ALfloat ModulationTime
;
97 ALfloat ModulationDepth
;
109 } Chorus
; /* Also Flanger */
118 ALfloat LowpassCutoff
;
148 ALfloat HighPassCutoff
;
157 typedef struct ALeffect
{
158 // Effect type (AL_EFFECT_NULL, ...)
163 const struct ALeffectVtable
*vtab
;
168 #define ALeffect_setParami(o, c, p, v) ((o)->vtab->setParami(o, c, p, v))
169 #define ALeffect_setParamf(o, c, p, v) ((o)->vtab->setParamf(o, c, p, v))
170 #define ALeffect_setParamiv(o, c, p, v) ((o)->vtab->setParamiv(o, c, p, v))
171 #define ALeffect_setParamfv(o, c, p, v) ((o)->vtab->setParamfv(o, c, p, v))
172 #define ALeffect_getParami(o, c, p, v) ((o)->vtab->getParami(o, c, p, v))
173 #define ALeffect_getParamf(o, c, p, v) ((o)->vtab->getParamf(o, c, p, v))
174 #define ALeffect_getParamiv(o, c, p, v) ((o)->vtab->getParamiv(o, c, p, v))
175 #define ALeffect_getParamfv(o, c, p, v) ((o)->vtab->getParamfv(o, c, p, v))
177 inline ALboolean
IsReverbEffect(ALenum type
)
178 { return type
== AL_EFFECT_REVERB
|| type
== AL_EFFECT_EAXREVERB
; }
180 void InitEffect(ALeffect
*effect
);
181 void ReleaseALEffects(ALCdevice
*device
);
183 void LoadReverbPreset(const char *name
, ALeffect
*effect
);