shithub: ft²

Download patch

ref: a70bb0a799ec52b062b43039c4b3b9978ae233a3
parent: 0ee14b8bd0dbe22d8979596dc8e1cd15265a70e1
author: Olav Sørensen <olav.sorensen@live.no>
date: Thu Mar 2 11:42:34 EST 2023

Minor cosmetic code changes

--- a/src/ft2_about.c
+++ b/src/ft2_about.c
@@ -200,7 +200,7 @@
 	customText3X = (SCREEN_W-8) - textWidth(customText3);
 	customText1Y = 157;
 	customText2Y = 157-12;
-	customText3Y = 157;	
+	customText3Y = 157;
 
 	aboutInit();
 	frameCounter = 0;
--- a/src/ft2_sysreqs.c
+++ b/src/ft2_sysreqs.c
@@ -59,9 +59,10 @@
 
 #define QUIT_MESSAGES 11
 
-// 8bitbubsy: Removed unsuitable/offensive ones...
 static quitType_t quitMessage[QUIT_MESSAGES] =
 {
+	// removed unsuitable/offensive ones...
+
 	{ "Do you really want to quit?", 2 },
 	{ "Tired already?", 2 },
 	{ "Dost thou wish to leave with such hasty abandon?", 2 },
--- a/src/mixer/ft2_mix_macros.h
+++ b/src/mixer/ft2_mix_macros.h
@@ -125,7 +125,7 @@
 
 // 2-tap linear interpolation (like FT2)
 
-/* 8bitbubsy: It may look like we are potentially going out of bounds while looking up the sample points,
+/* It may look like we are potentially going out of bounds while looking up the sample points,
 ** but the sample data has a fixed sample after the end (sampleEnd/loopEnd).
 */
 
@@ -160,7 +160,7 @@
 
 // 8-tap windowed-sinc interpolation (better quality, through LUT: mixer/ft2_windowed_sinc.c)
 
-/* 8bitbubsy: It may look like we are potentially going out of bounds while looking up the sample points,
+/* It may look like we are potentially going out of bounds while looking up the sample points,
 ** but the sample data is actually padded on both the left (negative) and right side, where correct tap
 ** samples are stored according to loop mode (or no loop).
 **
--- a/src/mixer/ft2_windowed_sinc.c
+++ b/src/mixer/ft2_windowed_sinc.c
@@ -16,7 +16,7 @@
 {
 	double s = 1.0, ds = 1.0, d = 0.0;
 
-	const double epsilon = 1E-9; // 8bb: 1E-7 -> 1E-9 for added precision (still fast to calculate)
+	const double epsilon = 1E-9; // 8bitbubsy: 1E-7 -> 1E-9 for added precision (still fast to calculate)
 
 	do
 	{
@@ -32,7 +32,7 @@
 static void getSinc(float *fLUTPtr, const double beta, const double cutoff)
 {
 	const double izeroBeta = Izero(beta);
-	const double kPi = 4.0 * atan(1.0) * cutoff; // M_PI can't be trusted
+	const double kPi = (4.0 * atan(1.0)) * cutoff; // M_PI can't be trusted
 
 	for (int32_t i = 0; i < SINC_LUT_LEN; i++)
 	{
@@ -68,7 +68,7 @@
 
 	getSinc(fKaiserSinc, 9.6377, 0.97);
 	getSinc(fDownSample1, 8.5, 0.5);
-	getSinc(fDownSample2, 7.3, 0.425);
+	getSinc(fDownSample2, 7.3, 0.425); // 8bitbubsy: tweaked the beta value (was aliasing quite a bit)
 
 	return true;
 }