From 58655e90a77b3ab41d2a5801713cf6a12a3be08f Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:33:12 +1000 Subject: [PATCH] Fix warning --- source/audiolib/src/tsf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/audiolib/src/tsf.h b/source/audiolib/src/tsf.h index c1a4b3273..b1d5e87dc 100644 --- a/source/audiolib/src/tsf.h +++ b/source/audiolib/src/tsf.h @@ -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: @@ -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]]; } }