From 0a6c17c5440ce31b58bab6edb9d5fa26f70af93f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 21 Mar 2018 09:32:04 -0700 Subject: Don't auto-attenuate the pitch shifter output --- Alc/effects/pshifter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Alc') 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) -- cgit v1.2.3