Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir committed Feb 13, 2024
1 parent ead83c8 commit 58655e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/audiolib/src/tsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,6 @@ static float tsf_voice_interpolate(float* input, unsigned int *pos, float alpha,
// Interpolation methods based off https://paulbourke.net/miscellaneous/interpolation/
switch (interpolatemode)
{
case TSF_INTERP_NEAREST:
return input[pos[1]];
case TSF_INTERP_LINEAR:
return (input[pos[1]] * (1.f - alpha) + input[pos[2]] * alpha);
case TSF_INTERP_CUBIC:
Expand All @@ -1122,6 +1120,9 @@ static float tsf_voice_interpolate(float* input, unsigned int *pos, float alpha,
a3 = pointb;
return (a0 * alpha * alpha2 + a1 * alpha2 + a2 * alpha + a3);
}
case TSF_INTERP_NEAREST:
default:
return input[pos[1]];
}
}

Expand Down

0 comments on commit 58655e9

Please sign in to comment.