diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 7 | ||||
-rw-r--r-- | OpenAL32/Include/alEffect.h | 110 | ||||
-rw-r--r-- | OpenAL32/alAuxEffectSlot.cpp | 2 | ||||
-rw-r--r-- | OpenAL32/alEffect.cpp | 2 |
4 files changed, 7 insertions, 114 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index c6f85a93..06681276 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -13,7 +13,6 @@ struct ALeffectslot; -union ALeffectProps; using ALeffectslotArray = al::FlexArray<ALeffectslot*>; @@ -25,7 +24,7 @@ struct ALeffectslotProps { ALeffectslot *Target; ALenum Type; - ALeffectProps Props; + EffectProps Props; EffectState *State; @@ -40,7 +39,7 @@ struct ALeffectslot { struct { ALenum Type{AL_EFFECT_NULL}; - ALeffectProps Props{}; + EffectProps Props{}; EffectState *State{nullptr}; } Effect; @@ -57,7 +56,7 @@ struct ALeffectslot { ALeffectslot *Target{nullptr}; ALenum EffectType{AL_EFFECT_NULL}; - ALeffectProps EffectProps{}; + EffectProps mEffectProps{}; EffectState *mEffectState{nullptr}; ALfloat RoomRolloff{0.0f}; /* Added to the source's room rolloff, not multiplied. */ diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h index 005478c6..51d6a24f 100644 --- a/OpenAL32/Include/alEffect.h +++ b/OpenAL32/Include/alEffect.h @@ -2,12 +2,9 @@ #define _AL_EFFECT_H_ #include "alMain.h" +#include "effects/base.h" -struct ALeffect; -struct EffectVtable; -struct EffectStateFactory; - enum { EAXREVERB_EFFECT = 0, REVERB_EFFECT, @@ -37,114 +34,11 @@ struct EffectList { extern const EffectList gEffectList[14]; -union ALeffectProps { - struct { - // Shared Reverb Properties - ALfloat Density; - ALfloat Diffusion; - ALfloat Gain; - ALfloat GainHF; - ALfloat DecayTime; - ALfloat DecayHFRatio; - ALfloat ReflectionsGain; - ALfloat ReflectionsDelay; - ALfloat LateReverbGain; - ALfloat LateReverbDelay; - ALfloat AirAbsorptionGainHF; - ALfloat RoomRolloffFactor; - ALboolean DecayHFLimit; - - // Additional EAX Reverb Properties - ALfloat GainLF; - ALfloat DecayLFRatio; - ALfloat ReflectionsPan[3]; - ALfloat LateReverbPan[3]; - ALfloat EchoTime; - ALfloat EchoDepth; - ALfloat ModulationTime; - ALfloat ModulationDepth; - ALfloat HFReference; - ALfloat LFReference; - } Reverb; - - struct { - ALfloat AttackTime; - ALfloat ReleaseTime; - ALfloat Resonance; - ALfloat PeakGain; - } Autowah; - - struct { - ALint Waveform; - ALint Phase; - ALfloat Rate; - ALfloat Depth; - ALfloat Feedback; - ALfloat Delay; - } Chorus; /* Also Flanger */ - - struct { - ALboolean OnOff; - } Compressor; - - struct { - ALfloat Edge; - ALfloat Gain; - ALfloat LowpassCutoff; - ALfloat EQCenter; - ALfloat EQBandwidth; - } Distortion; - - struct { - ALfloat Delay; - ALfloat LRDelay; - - ALfloat Damping; - ALfloat Feedback; - - ALfloat Spread; - } Echo; - - struct { - ALfloat LowCutoff; - ALfloat LowGain; - ALfloat Mid1Center; - ALfloat Mid1Gain; - ALfloat Mid1Width; - ALfloat Mid2Center; - ALfloat Mid2Gain; - ALfloat Mid2Width; - ALfloat HighCutoff; - ALfloat HighGain; - } Equalizer; - - struct { - ALfloat Frequency; - ALint LeftDirection; - ALint RightDirection; - } Fshifter; - - struct { - ALfloat Frequency; - ALfloat HighPassCutoff; - ALint Waveform; - } Modulator; - - struct { - ALint CoarseTune; - ALint FineTune; - } Pshifter; - - struct { - ALfloat Gain; - } Dedicated; -}; - struct ALeffect { // Effect type (AL_EFFECT_NULL, ...) ALenum type{AL_EFFECT_NULL}; - ALeffectProps Props{}; + EffectProps Props{}; const EffectVtable *vtab{nullptr}; diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp index b8b73bed..fa9dcc57 100644 --- a/OpenAL32/alAuxEffectSlot.cpp +++ b/OpenAL32/alAuxEffectSlot.cpp @@ -632,7 +632,7 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect if(!effect) { EffectSlot->Effect.Type = AL_EFFECT_NULL; - EffectSlot->Effect.Props = ALeffectProps{}; + EffectSlot->Effect.Props = EffectProps {}; } else { diff --git a/OpenAL32/alEffect.cpp b/OpenAL32/alEffect.cpp index 8b89fd45..81ec26c6 100644 --- a/OpenAL32/alEffect.cpp +++ b/OpenAL32/alEffect.cpp @@ -116,7 +116,7 @@ void InitEffectParams(ALeffect *effect, ALenum type) } else { - effect->Props = ALeffectProps{}; + effect->Props = EffectProps {}; effect->vtab = nullptr; } effect->type = type; |