Fix a delta phase offset calculation in the pitch shifter

tmp can be negative, and &1 is not the same as %2 in that case.
This commit is contained in:
Chris Robinson
2018-03-22 08:56:48 -07:00
parent eeff730034
commit 1d6622aa2b
+1 -1
View File
@@ -309,7 +309,7 @@ static ALvoid ALpshifterState_process(ALpshifterState *state, ALsizei SamplesToD
/* Map delta phase into +/- Pi interval */
j = fastf2i(tmp / F_PI);
tmp -= F_PI * (ALfloat)(j + (j&1));
tmp -= F_PI * (ALfloat)(j + (j%2));
/* Get deviation from bin frequency from the +/- Pi interval */
tmp /= expected;