shithub: ft²

Download patch

ref: ba8d4ea83a668289d1a55d67148c0de1c389dbd5
parent: e91a7bb916ae494f0e39df6e192ad55c9974c6c3
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Sep 19 20:01:33 EDT 2022

Windowed-sinc interpolator changes

--- a/src/ft2_header.h
+++ b/src/ft2_header.h
@@ -12,7 +12,7 @@
 #endif
 #include "ft2_replayer.h"
 
-#define PROG_VER_STR "1.57"
+#define PROG_VER_STR "1.58"
 
 // do NOT change these! It will only mess things up...
 
--- a/src/mixer/ft2_windowed_sinc.h
+++ b/src/mixer/ft2_windowed_sinc.h
@@ -4,16 +4,16 @@
 #include <stdbool.h>
 #include "ft2_mix.h"
 
-// 8 or 16. 8 should only be used if the code is too slow for the target system.
-#define SINC_TAPS 16
+// 8 or 16. 8 allows more unwanted frequencies, which may be preferred for lo-fi samples
+#define SINC_TAPS 8
 
 // log2(SINC_TAPS)
-#define SINC_TAPS_BITS 4
+#define SINC_TAPS_BITS 3
 
-#define SINC_PHASES 16384
+#define SINC_PHASES 8192
 
 // log2(SINC_PHASES)
-#define SINC_PHASES_BITS 14
+#define SINC_PHASES_BITS 13
 
 #define SINC_LUT_LEN (SINC_TAPS * SINC_PHASES)
 #define SINC_FSHIFT (MIXER_FRAC_BITS-(SINC_PHASES_BITS+SINC_TAPS_BITS))