Skip to content

Commit 9f678b3

Browse files
tmyqlfpirHendricks266
authored andcommitted
Fix warning
1 parent 82da7cd commit 9f678b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/audiolib/src/tsf.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,6 @@ static float tsf_voice_interpolate(float* input, unsigned int *pos, float alpha,
11061106
// Interpolation methods based off https://paulbourke.net/miscellaneous/interpolation/
11071107
switch (interpolatemode)
11081108
{
1109-
case TSF_INTERP_NEAREST:
1110-
return input[pos[1]];
11111109
case TSF_INTERP_LINEAR:
11121110
return (input[pos[1]] * (1.f - alpha) + input[pos[2]] * alpha);
11131111
case TSF_INTERP_CUBIC:
@@ -1122,6 +1120,9 @@ static float tsf_voice_interpolate(float* input, unsigned int *pos, float alpha,
11221120
a3 = pointb;
11231121
return (a0 * alpha * alpha2 + a1 * alpha2 + a2 * alpha + a3);
11241122
}
1123+
case TSF_INTERP_NEAREST:
1124+
default:
1125+
return input[pos[1]];
11251126
}
11261127
}
11271128

0 commit comments

Comments
 (0)