diff options
author | Chris Robinson <[email protected]> | 2018-01-09 23:21:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-09 23:21:16 -0800 |
commit | de8c5b18248ee5d121cbd4b34b9af94f5e16df35 (patch) | |
tree | 76e4fb32c7ca5cb795c09dbe2d612377a32b8f2d /OpenAL32 | |
parent | 9e2eb5dc231d835bf78a7225b6b0def74d0220ef (diff) |
Combine the chorus and flanger processing functions
Given that they're nearly identical, it should be relatively simple to use the
same effect state to process either of them, similar to the reverbs. The big
differences seem to be the delay range (much shorter with flanger) and the
defaults.
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alEffect.h | 11 | ||||
-rw-r--r-- | OpenAL32/alEffect.c | 12 |
2 files changed, 7 insertions, 16 deletions
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h index af488aab..bec50f7d 100644 --- a/OpenAL32/Include/alEffect.h +++ b/OpenAL32/Include/alEffect.h @@ -97,7 +97,7 @@ typedef union ALeffectProps { ALfloat Depth; ALfloat Feedback; ALfloat Delay; - } Chorus; + } Chorus; /* Also Flanger */ struct { ALboolean OnOff; @@ -135,15 +135,6 @@ typedef union ALeffectProps { } Equalizer; struct { - ALint Waveform; - ALint Phase; - ALfloat Rate; - ALfloat Depth; - ALfloat Feedback; - ALfloat Delay; - } Flanger; - - struct { ALfloat Frequency; ALfloat HighPassCutoff; ALint Waveform; diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 6761e661..0dac429a 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -493,12 +493,12 @@ static void InitEffectParams(ALeffect *effect, ALenum type) SET_VTABLE1(ALequalizer, effect); break; case AL_EFFECT_FLANGER: - effect->Props.Flanger.Waveform = AL_FLANGER_DEFAULT_WAVEFORM; - effect->Props.Flanger.Phase = AL_FLANGER_DEFAULT_PHASE; - effect->Props.Flanger.Rate = AL_FLANGER_DEFAULT_RATE; - effect->Props.Flanger.Depth = AL_FLANGER_DEFAULT_DEPTH; - effect->Props.Flanger.Feedback = AL_FLANGER_DEFAULT_FEEDBACK; - effect->Props.Flanger.Delay = AL_FLANGER_DEFAULT_DELAY; + effect->Props.Chorus.Waveform = AL_FLANGER_DEFAULT_WAVEFORM; + effect->Props.Chorus.Phase = AL_FLANGER_DEFAULT_PHASE; + effect->Props.Chorus.Rate = AL_FLANGER_DEFAULT_RATE; + effect->Props.Chorus.Depth = AL_FLANGER_DEFAULT_DEPTH; + effect->Props.Chorus.Feedback = AL_FLANGER_DEFAULT_FEEDBACK; + effect->Props.Chorus.Delay = AL_FLANGER_DEFAULT_DELAY; SET_VTABLE1(ALflanger, effect); break; case AL_EFFECT_RING_MODULATOR: |