diff options
author | Chris Robinson <[email protected]> | 2018-03-23 14:52:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-23 14:52:59 -0700 |
commit | 6990478369e76a55aa27bebceb45db081fe8144e (patch) | |
tree | 0283f2b57eaea6d96b68dd0faad781c21c061145 /Alc/effects/distortion.c | |
parent | e37634e908c7563e6281997d50800a2f9633d8d2 (diff) |
Rename ALfilterState/Type to BiquadState/Type
Diffstat (limited to 'Alc/effects/distortion.c')
-rw-r--r-- | Alc/effects/distortion.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c index 09289175..aa06a0a3 100644 --- a/Alc/effects/distortion.c +++ b/Alc/effects/distortion.c @@ -37,8 +37,8 @@ typedef struct ALdistortionState { ALfloat Gain[MAX_OUTPUT_CHANNELS]; /* Effect parameters */ - ALfilterState lowpass; - ALfilterState bandpass; + BiquadState lowpass; + BiquadState bandpass; ALfloat attenuation; ALfloat edge_coeff; @@ -59,8 +59,8 @@ static void ALdistortionState_Construct(ALdistortionState *state) ALeffectState_Construct(STATIC_CAST(ALeffectState, state)); SET_VTABLE2(ALdistortionState, ALeffectState, state); - ALfilterState_clear(&state->lowpass); - ALfilterState_clear(&state->bandpass); + BiquadState_clear(&state->lowpass); + BiquadState_clear(&state->bandpass); } static ALvoid ALdistortionState_Destruct(ALdistortionState *state) @@ -93,14 +93,14 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, const ALCcontex /* Multiply sampling frequency by the amount of oversampling done during * processing. */ - ALfilterState_setParams(&state->lowpass, ALfilterType_LowPass, 1.0f, + BiquadState_setParams(&state->lowpass, BiquadType_LowPass, 1.0f, cutoff / (frequency*4.0f), calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth) ); cutoff = props->Distortion.EQCenter; /* Convert bandwidth in Hz to octaves. */ bandwidth = props->Distortion.EQBandwidth / (cutoff * 0.67f); - ALfilterState_setParams(&state->bandpass, ALfilterType_BandPass, 1.0f, + BiquadState_setParams(&state->bandpass, BiquadType_BandPass, 1.0f, cutoff / (frequency*4.0f), calc_rcpQ_from_bandwidth(cutoff / (frequency*4.0f), bandwidth) ); @@ -136,7 +136,7 @@ static ALvoid ALdistortionState_process(ALdistortionState *state, ALsizei Sample * (which is fortunately first step of distortion). So combine three * operations into the one. */ - ALfilterState_process(&state->lowpass, buffer[1], buffer[0], todo); + BiquadState_process(&state->lowpass, buffer[1], buffer[0], todo); /* Second step, do distortion using waveshaper function to emulate * signal processing during tube overdriving. Three steps of @@ -155,7 +155,7 @@ static ALvoid ALdistortionState_process(ALdistortionState *state, ALsizei Sample } /* Third step, do bandpass filtering of distorted signal. */ - ALfilterState_process(&state->bandpass, buffer[1], buffer[0], todo); + BiquadState_process(&state->bandpass, buffer[1], buffer[0], todo); todo >>= 2; for(k = 0;k < NumChannels;k++) |