Browse code

[NCSF] Fix subtle rare clipping issues in some songs

Clarissa Walker authored on 2024/09/24 20:51:04
Showing 1 changed files
... ...
@@ -220,12 +220,12 @@ inline std::int16_t Cnv_Sust(int sust)
220 220
 
221 221
 inline int Cnv_Sine(int arg)
222 222
 {
223
+	static const int lut_size = 32;
223 224
 	static const std::int8_t lut[] =
224 225
 	{
225 226
 		0, 6, 12, 19, 25, 31, 37, 43, 49, 54, 60, 65, 71, 76, 81, 85, 90, 94,
226 227
 		98, 102, 106, 109, 112, 115, 117, 120, 122, 123, 125, 126, 126, 127, 127
227 228
 	};
228
-	static const int lut_size = sizeof(lut) / sizeof(std::int8_t);
229 229
 
230 230
 	if (arg < lut_size)
231 231
 		return lut[arg];