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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user