diff options
author | Chris Robinson <[email protected]> | 2018-03-21 09:32:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-21 09:32:04 -0700 |
commit | 0a6c17c5440ce31b58bab6edb9d5fa26f70af93f (patch) | |
tree | 296a88fd701ef6eaec423fb33777137c81ab5614 /Alc/effects | |
parent | f11d7eeadfcf9ec2ea427fa14aa96037e8cdf008 (diff) |
Don't auto-attenuate the pitch shifter output
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/pshifter.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/effects/pshifter.c b/Alc/effects/pshifter.c index 15e26e3d..e38f4ed2 100644 --- a/Alc/effects/pshifter.c +++ b/Alc/effects/pshifter.c @@ -244,13 +244,14 @@ static ALvoid ALpshifterState_update(ALpshifterState *state, const ALCcontext *c { const ALCdevice *device = context->Device; ALfloat coeffs[MAX_AMBI_COEFFS]; - const ALfloat adjust = 0.707945784384f; /*-3dB adjust*/ state->Frequency = (ALfloat)device->Frequency; - state->PitchShift = powf(2.0f,((ALfloat)props->Pshifter.CoarseTune + props->Pshifter.FineTune/100.0f)/12.0f); + state->PitchShift = powf(2.0f, + (ALfloat)(props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune) / 1200.0f + ); CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs); - ComputeDryPanGains(&device->Dry, coeffs, slot->Params.Gain * adjust, state->Gain); + ComputeDryPanGains(&device->Dry, coeffs, slot->Params.Gain, state->Gain); } static ALvoid ALpshifterState_process(ALpshifterState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) |