aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alEffect.h
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include/alEffect.h')
-rw-r--r--OpenAL32/Include/alEffect.h77
1 files changed, 47 insertions, 30 deletions
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
index 91ee782f..7b849c0c 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -10,24 +10,34 @@ extern "C" {
struct ALeffect;
enum {
- EAXREVERB = 0,
- REVERB,
- AUTOWAH,
- CHORUS,
- COMPRESSOR,
- DISTORTION,
- ECHO,
- EQUALIZER,
- FLANGER,
- MODULATOR,
- DEDICATED,
+ 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,
+ DEDICATED_EFFECT,
MAX_EFFECTS
};
extern ALboolean DisabledEffects[MAX_EFFECTS];
extern ALfloat ReverbBoost;
-extern ALboolean EmulateEAXReverb;
+
+struct EffectList {
+ const char name[16];
+ int type;
+ ALenum val;
+};
+#define EFFECTLIST_SIZE 14
+extern const struct EffectList EffectList[EFFECTLIST_SIZE];
+
struct ALeffectVtable {
void (*const setParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint val);
@@ -58,8 +68,10 @@ extern const struct ALeffectVtable ALdistortion_vtable;
extern const struct ALeffectVtable ALecho_vtable;
extern const struct ALeffectVtable ALequalizer_vtable;
extern const struct ALeffectVtable ALflanger_vtable;
+extern const struct ALeffectVtable ALfshifter_vtable;
extern const struct ALeffectVtable ALmodulator_vtable;
extern const struct ALeffectVtable ALnull_vtable;
+extern const struct ALeffectVtable ALpshifter_vtable;
extern const struct ALeffectVtable ALdedicated_vtable;
@@ -96,8 +108,8 @@ typedef union ALeffectProps {
struct {
ALfloat AttackTime;
ALfloat ReleaseTime;
- ALfloat PeakGain;
ALfloat Resonance;
+ ALfloat PeakGain;
} Autowah;
struct {
@@ -107,7 +119,7 @@ typedef union ALeffectProps {
ALfloat Depth;
ALfloat Feedback;
ALfloat Delay;
- } Chorus;
+ } Chorus; /* Also Flanger */
struct {
ALboolean OnOff;
@@ -145,13 +157,10 @@ typedef union ALeffectProps {
} Equalizer;
struct {
- ALint Waveform;
- ALint Phase;
- ALfloat Rate;
- ALfloat Depth;
- ALfloat Feedback;
- ALfloat Delay;
- } Flanger;
+ ALfloat Frequency;
+ ALint LeftDirection;
+ ALint RightDirection;
+ } Fshifter;
struct {
ALfloat Frequency;
@@ -160,6 +169,11 @@ typedef union ALeffectProps {
} Modulator;
struct {
+ ALint CoarseTune;
+ ALint FineTune;
+ } Pshifter;
+
+ struct {
ALfloat Gain;
} Dedicated;
} ALeffectProps;
@@ -170,24 +184,27 @@ typedef struct ALeffect {
ALeffectProps Props;
- const struct ALeffectVtable *vtbl;
+ const struct ALeffectVtable *vtab;
/* Self ID */
ALuint id;
} ALeffect;
-
-inline struct ALeffect *LookupEffect(ALCdevice *device, ALuint id)
-{ return (struct ALeffect*)LookupUIntMapKey(&device->EffectMap, id); }
-inline struct ALeffect *RemoveEffect(ALCdevice *device, ALuint id)
-{ return (struct ALeffect*)RemoveUIntMapKey(&device->EffectMap, id); }
+#define ALeffect_setParami(o, c, p, v) ((o)->vtab->setParami(o, c, p, v))
+#define ALeffect_setParamf(o, c, p, v) ((o)->vtab->setParamf(o, c, p, v))
+#define ALeffect_setParamiv(o, c, p, v) ((o)->vtab->setParamiv(o, c, p, v))
+#define ALeffect_setParamfv(o, c, p, v) ((o)->vtab->setParamfv(o, c, p, v))
+#define ALeffect_getParami(o, c, p, v) ((o)->vtab->getParami(o, c, p, v))
+#define ALeffect_getParamf(o, c, p, v) ((o)->vtab->getParamf(o, c, p, v))
+#define ALeffect_getParamiv(o, c, p, v) ((o)->vtab->getParamiv(o, c, p, v))
+#define ALeffect_getParamfv(o, c, p, v) ((o)->vtab->getParamfv(o, c, p, v))
inline ALboolean IsReverbEffect(ALenum type)
{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
-ALenum InitEffect(ALeffect *effect);
-ALvoid ReleaseALEffects(ALCdevice *device);
+void InitEffect(ALeffect *effect);
+void ReleaseALEffects(ALCdevice *device);
-ALvoid LoadReverbPreset(const char *name, ALeffect *effect);
+void LoadReverbPreset(const char *name, ALeffect *effect);
#ifdef __cplusplus
}