1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#ifndef AL_EFFECT_H
#define AL_EFFECT_H
#include <array>
#include <bitset>
#include <string_view>
#include "AL/al.h"
#include "AL/efx.h"
#include "al/effects/effects.h"
#include "alc/effects/base.h"
enum {
EAXREVERB_EFFECT = 0,
REVERB_EFFECT,
AUTOWAH_EFFECT,
CHORUS_EFFECT,
COMPRESSOR_EFFECT,
DISTORTION_EFFECT,
ECHO_EFFECT,
EQUALIZER_EFFECT,
FLANGER_EFFECT,
FSHIFTER_EFFECT,
MODULATOR_EFFECT,
PSHIFTER_EFFECT,
VMORPHER_EFFECT,
DEDICATED_EFFECT,
CONVOLUTION_EFFECT,
MAX_EFFECTS
};
inline std::bitset<MAX_EFFECTS> DisabledEffects;
struct EffectList {
const char name[16]; /* NOLINT(*-avoid-c-arrays) */
ALuint type;
ALenum val;
};
extern const std::array<EffectList,16> gEffectList;
struct ALeffect {
// Effect type (AL_EFFECT_NULL, ...)
ALenum type{AL_EFFECT_NULL};
EffectProps Props{};
/* Self ID */
ALuint id{0u};
static void SetName(ALCcontext *context, ALuint id, std::string_view name);
DISABLE_ALLOC
};
void InitEffect(ALeffect *effect);
void LoadReverbPreset(const char *name, ALeffect *effect);
bool IsValidEffectType(ALenum type) noexcept;
#endif
|