diff options
Diffstat (limited to 'Alc')
-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) |