summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h1
-rw-r--r--OpenAL32/Include/alEffect.h66
-rw-r--r--OpenAL32/alAuxEffectSlot.c1
-rw-r--r--OpenAL32/alEffect.c4
-rw-r--r--OpenAL32/alExtension.c1
5 files changed, 43 insertions, 30 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index 00de7a3b..945860a0 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -98,6 +98,7 @@ ALeffectStateFactory *ALnullStateFactory_getFactory(void);
ALeffectStateFactory *ALreverbStateFactory_getFactory(void);
ALeffectStateFactory *ALautowahStateFactory_getFactory(void);
ALeffectStateFactory *ALchorusStateFactory_getFactory(void);
+ALeffectStateFactory *ALcompressorStateFactory_getFactory(void);
ALeffectStateFactory *ALdistortionStateFactory_getFactory(void);
ALeffectStateFactory *ALechoStateFactory_getFactory(void);
ALeffectStateFactory *ALequalizerStateFactory_getFactory(void);
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
index 7269c13e..89fa5381 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -14,6 +14,7 @@ enum {
REVERB,
AUTOWAH,
CHORUS,
+ COMPRESSOR,
DISTORTION,
ECHO,
EQUALIZER,
@@ -52,6 +53,7 @@ extern const struct ALeffectVtable ALeaxreverb_vtable;
extern const struct ALeffectVtable ALreverb_vtable;
extern const struct ALeffectVtable ALautowah_vtable;
extern const struct ALeffectVtable ALchorus_vtable;
+extern const struct ALeffectVtable ALcompressor_vtable;
extern const struct ALeffectVtable ALdistortion_vtable;
extern const struct ALeffectVtable ALecho_vtable;
extern const struct ALeffectVtable ALequalizer_vtable;
@@ -99,42 +101,35 @@ typedef union ALeffectProps {
} Autowah;
struct {
- ALfloat Delay;
- ALfloat LRDelay;
-
- ALfloat Damping;
+ ALint Waveform;
+ ALint Phase;
+ ALfloat Rate;
+ ALfloat Depth;
ALfloat Feedback;
-
- ALfloat Spread;
- } Echo;
+ ALfloat Delay;
+ } Chorus;
struct {
- ALfloat Frequency;
- ALfloat HighPassCutoff;
- ALint Waveform;
- } Modulator;
+ ALboolean OnOff;
+ } Compressor;
struct {
+ ALfloat Edge;
ALfloat Gain;
- } Dedicated;
+ ALfloat LowpassCutoff;
+ ALfloat EQCenter;
+ ALfloat EQBandwidth;
+ } Distortion;
struct {
- ALint Waveform;
- ALint Phase;
- ALfloat Rate;
- ALfloat Depth;
- ALfloat Feedback;
ALfloat Delay;
- } Chorus;
+ ALfloat LRDelay;
- struct {
- ALint Waveform;
- ALint Phase;
- ALfloat Rate;
- ALfloat Depth;
+ ALfloat Damping;
ALfloat Feedback;
- ALfloat Delay;
- } Flanger;
+
+ ALfloat Spread;
+ } Echo;
struct {
ALfloat Delay;
@@ -151,12 +146,23 @@ typedef union ALeffectProps {
} Equalizer;
struct {
- ALfloat Edge;
+ ALint Waveform;
+ ALint Phase;
+ ALfloat Rate;
+ ALfloat Depth;
+ ALfloat Feedback;
+ ALfloat Delay;
+ } Flanger;
+
+ struct {
+ ALfloat Frequency;
+ ALfloat HighPassCutoff;
+ ALint Waveform;
+ } Modulator;
+
+ struct {
ALfloat Gain;
- ALfloat LowpassCutoff;
- ALfloat EQCenter;
- ALfloat EQBandwidth;
- } Distortion;
+ } Dedicated;
} ALeffectProps;
typedef struct ALeffect {
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 827820eb..5fde2d3d 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -459,6 +459,7 @@ void InitEffectFactoryMap(void)
InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_REVERB, ALreverbStateFactory_getFactory);
InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_AUTOWAH, ALautowahStateFactory_getFactory);
InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_CHORUS, ALchorusStateFactory_getFactory);
+ InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_COMPRESSOR, ALcompressorStateFactory_getFactory);
InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_DISTORTION, ALdistortionStateFactory_getFactory);
InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_ECHO, ALechoStateFactory_getFactory);
InsertUIntMapEntry(&EffectStateFactoryMap, AL_EFFECT_EQUALIZER, ALequalizerStateFactory_getFactory);
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index ed6a1d5a..ca908a40 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -429,6 +429,10 @@ static void InitEffectParams(ALeffect *effect, ALenum type)
effect->Props.Chorus.Delay = AL_CHORUS_DEFAULT_DELAY;
effect->vtbl = &ALchorus_vtable;
break;
+ case AL_EFFECT_COMPRESSOR:
+ effect->Props.Compressor.OnOff = AL_COMPRESSOR_DEFAULT_ONOFF;
+ effect->vtbl = &ALcompressor_vtable;
+ break;
case AL_EFFECT_DISTORTION:
effect->Props.Distortion.Edge = AL_DISTORTION_DEFAULT_EDGE;
effect->Props.Distortion.Gain = AL_DISTORTION_DEFAULT_GAIN;
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index 236e56d0..785f172e 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -40,6 +40,7 @@ const struct EffectList EffectList[] = {
{ "reverb", REVERB, "AL_EFFECT_REVERB", AL_EFFECT_REVERB },
{ "autowah", AUTOWAH, "AL_EFFECT_AUTOWAH", AL_EFFECT_AUTOWAH },
{ "chorus", CHORUS, "AL_EFFECT_CHORUS", AL_EFFECT_CHORUS },
+ { "compressor", COMPRESSOR, "AL_EFFECT_COMPRESSOR", AL_EFFECT_COMPRESSOR },
{ "distortion", DISTORTION, "AL_EFFECT_DISTORTION", AL_EFFECT_DISTORTION },
{ "echo", ECHO, "AL_EFFECT_ECHO", AL_EFFECT_ECHO },
{ "equalizer", EQUALIZER, "AL_EFFECT_EQUALIZER", AL_EFFECT_EQUALIZER },