2019-07-28 21:29:59 -07:00
|
|
|
#ifndef AL_EFFECT_H
|
|
|
|
#define AL_EFFECT_H
|
|
|
|
|
|
|
|
#include "AL/al.h"
|
|
|
|
#include "AL/efx.h"
|
2007-12-17 17:20:11 -08:00
|
|
|
|
2019-03-22 22:48:12 -07:00
|
|
|
#include "effects/base.h"
|
2007-12-17 17:20:11 -08:00
|
|
|
|
|
|
|
|
2008-11-14 07:13:59 -08:00
|
|
|
enum {
|
2018-01-11 09:34:01 -08:00
|
|
|
EAXREVERB_EFFECT = 0,
|
|
|
|
REVERB_EFFECT,
|
2018-07-22 00:48:54 +02:00
|
|
|
AUTOWAH_EFFECT,
|
2018-01-11 09:34:01 -08:00
|
|
|
CHORUS_EFFECT,
|
|
|
|
COMPRESSOR_EFFECT,
|
|
|
|
DISTORTION_EFFECT,
|
|
|
|
ECHO_EFFECT,
|
|
|
|
EQUALIZER_EFFECT,
|
|
|
|
FLANGER_EFFECT,
|
2018-05-20 17:23:03 +02:00
|
|
|
FSHIFTER_EFFECT,
|
2018-01-11 09:34:01 -08:00
|
|
|
MODULATOR_EFFECT,
|
2018-03-18 17:47:17 +01:00
|
|
|
PSHIFTER_EFFECT,
|
2019-07-10 07:14:31 +02:00
|
|
|
VMORPHER_EFFECT,
|
2018-01-11 09:34:01 -08:00
|
|
|
DEDICATED_EFFECT,
|
2009-04-12 16:01:10 -07:00
|
|
|
|
2008-11-14 07:13:59 -08:00
|
|
|
MAX_EFFECTS
|
|
|
|
};
|
|
|
|
extern ALboolean DisabledEffects[MAX_EFFECTS];
|
|
|
|
|
2011-07-20 22:26:16 -07:00
|
|
|
extern ALfloat ReverbBoost;
|
|
|
|
|
2018-01-11 09:25:17 -08:00
|
|
|
struct EffectList {
|
2018-01-11 09:34:01 -08:00
|
|
|
const char name[16];
|
2018-01-11 09:25:17 -08:00
|
|
|
int type;
|
|
|
|
ALenum val;
|
|
|
|
};
|
2019-07-10 07:14:31 +02:00
|
|
|
extern const EffectList gEffectList[15];
|
2018-01-11 09:25:17 -08:00
|
|
|
|
2013-05-24 23:26:59 -07:00
|
|
|
|
2018-11-24 13:23:27 -08:00
|
|
|
struct ALeffect {
|
2013-05-25 22:07:31 -07:00
|
|
|
// Effect type (AL_EFFECT_NULL, ...)
|
2018-11-24 13:23:27 -08:00
|
|
|
ALenum type{AL_EFFECT_NULL};
|
2013-05-25 22:07:31 -07:00
|
|
|
|
2019-03-22 22:48:12 -07:00
|
|
|
EffectProps Props{};
|
2013-05-18 01:33:01 -07:00
|
|
|
|
2019-03-22 13:33:58 -07:00
|
|
|
const EffectVtable *vtab{nullptr};
|
2011-09-11 08:59:47 -07:00
|
|
|
|
2012-04-19 22:28:01 -07:00
|
|
|
/* Self ID */
|
2018-11-24 13:23:27 -08:00
|
|
|
ALuint id{0u};
|
|
|
|
};
|
2007-12-17 17:20:11 -08:00
|
|
|
|
2013-11-04 12:12:31 -08:00
|
|
|
inline ALboolean IsReverbEffect(ALenum type)
|
2011-07-05 04:36:41 -07:00
|
|
|
{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
|
2007-12-17 17:20:11 -08:00
|
|
|
|
2019-03-22 13:33:58 -07:00
|
|
|
EffectStateFactory *getFactoryByType(ALenum type);
|
|
|
|
|
2018-01-27 23:50:04 -08:00
|
|
|
void InitEffect(ALeffect *effect);
|
2007-12-17 17:20:11 -08:00
|
|
|
|
2018-01-27 23:50:04 -08:00
|
|
|
void LoadReverbPreset(const char *name, ALeffect *effect);
|
2012-01-20 16:23:15 -08:00
|
|
|
|
2007-12-17 17:20:11 -08:00
|
|
|
#endif
|