26 extern ALboolean DisabledEffects
[MAX_EFFECTS
];
28 extern ALfloat ReverbBoost
;
35 extern const EffectList gEffectList
[14];
37 struct ALeffectVtable
{
38 void (*const setParami
)(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
);
39 void (*const setParamiv
)(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
);
40 void (*const setParamf
)(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
);
41 void (*const setParamfv
)(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
);
43 void (*const getParami
)(const ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
);
44 void (*const getParamiv
)(const ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
);
45 void (*const getParamf
)(const ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
);
46 void (*const getParamfv
)(const ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
);
49 #define DEFINE_ALEFFECT_VTABLE(T) \
50 const ALeffectVtable T##_vtable = { \
51 T##_setParami, T##_setParamiv, \
52 T##_setParamf, T##_setParamfv, \
53 T##_getParami, T##_getParamiv, \
54 T##_getParamf, T##_getParamfv, \
57 extern const ALeffectVtable ALeaxreverb_vtable
;
58 extern const ALeffectVtable ALreverb_vtable
;
59 extern const ALeffectVtable ALautowah_vtable
;
60 extern const ALeffectVtable ALchorus_vtable
;
61 extern const ALeffectVtable ALcompressor_vtable
;
62 extern const ALeffectVtable ALdistortion_vtable
;
63 extern const ALeffectVtable ALecho_vtable
;
64 extern const ALeffectVtable ALequalizer_vtable
;
65 extern const ALeffectVtable ALflanger_vtable
;
66 extern const ALeffectVtable ALfshifter_vtable
;
67 extern const ALeffectVtable ALmodulator_vtable
;
68 extern const ALeffectVtable ALnull_vtable
;
69 extern const ALeffectVtable ALpshifter_vtable
;
70 extern const ALeffectVtable ALdedicated_vtable
;
75 // Shared Reverb Properties
82 ALfloat ReflectionsGain
;
83 ALfloat ReflectionsDelay
;
84 ALfloat LateReverbGain
;
85 ALfloat LateReverbDelay
;
86 ALfloat AirAbsorptionGainHF
;
87 ALfloat RoomRolloffFactor
;
88 ALboolean DecayHFLimit
;
90 // Additional EAX Reverb Properties
93 ALfloat ReflectionsPan
[3];
94 ALfloat LateReverbPan
[3];
97 ALfloat ModulationTime
;
98 ALfloat ModulationDepth
;
117 } Chorus
; /* Also Flanger */
126 ALfloat LowpassCutoff
;
157 ALint RightDirection
;
162 ALfloat HighPassCutoff
;
177 // Effect type (AL_EFFECT_NULL, ...)
178 ALenum type
{AL_EFFECT_NULL
};
180 ALeffectProps Props
{};
182 const ALeffectVtable
*vtab
{nullptr};
187 #define ALeffect_setParami(o, c, p, v) ((o)->vtab->setParami(o, c, p, v))
188 #define ALeffect_setParamf(o, c, p, v) ((o)->vtab->setParamf(o, c, p, v))
189 #define ALeffect_setParamiv(o, c, p, v) ((o)->vtab->setParamiv(o, c, p, v))
190 #define ALeffect_setParamfv(o, c, p, v) ((o)->vtab->setParamfv(o, c, p, v))
191 #define ALeffect_getParami(o, c, p, v) ((o)->vtab->getParami(o, c, p, v))
192 #define ALeffect_getParamf(o, c, p, v) ((o)->vtab->getParamf(o, c, p, v))
193 #define ALeffect_getParamiv(o, c, p, v) ((o)->vtab->getParamiv(o, c, p, v))
194 #define ALeffect_getParamfv(o, c, p, v) ((o)->vtab->getParamfv(o, c, p, v))
196 inline ALboolean
IsReverbEffect(ALenum type
)
197 { return type
== AL_EFFECT_REVERB
|| type
== AL_EFFECT_EAXREVERB
; }
199 void InitEffect(ALeffect
*effect
);
201 void LoadReverbPreset(const char *name
, ALeffect
*effect
);