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
*vtbl
;
169 inline ALboolean
IsReverbEffect(ALenum type
)
170 { return type
== AL_EFFECT_REVERB
|| type
== AL_EFFECT_EAXREVERB
; }
172 void InitEffect(ALeffect
*effect
);
173 void ReleaseALEffects(ALCdevice
*device
);
175 void LoadReverbPreset(const char *name
, ALeffect
*effect
);