diff options
author | Chris Robinson <[email protected]> | 2019-09-29 22:43:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-29 22:43:46 -0700 |
commit | fb56b020412eb090d9ce4e2ffcc691766e5214b2 (patch) | |
tree | 38a6aa63ab11059ac2fadf6a463f6c0c9b2510f8 | |
parent | 94ff2daafc071168a69d7af3694f0ab3126dddc0 (diff) |
Modify the bsinc resampler
Readjusted the bsinc12 cutoff back to -60dB. Also increased the filter's phase
count.
-rw-r--r-- | alc/alu.h | 2 | ||||
-rw-r--r-- | native-tools/bsincgen.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -59,7 +59,7 @@ extern Resampler ResamplerDefault; */ #define BSINC_SCALE_BITS 4 #define BSINC_SCALE_COUNT (1<<BSINC_SCALE_BITS) -#define BSINC_PHASE_BITS 4 +#define BSINC_PHASE_BITS 5 #define BSINC_PHASE_COUNT (1<<BSINC_PHASE_BITS) /* Interpolator state. Kind of a misnomer since the interpolator itself is diff --git a/native-tools/bsincgen.c b/native-tools/bsincgen.c index 83f03191..de59ddff 100644 --- a/native-tools/bsincgen.c +++ b/native-tools/bsincgen.c @@ -53,7 +53,7 @@ // The number of distinct scale and phase intervals within the filter table.
// Must be the same as in alu.h!
#define BSINC_SCALE_COUNT 16
-#define BSINC_PHASE_COUNT 16
+#define BSINC_PHASE_COUNT 32
/* 48 points includes the doubling for downsampling, so the maximum number of
* base sample points is 24, which is 23rd order.
@@ -353,8 +353,8 @@ int main(int argc, char *argv[]) "};\n\n", BSINC_SCALE_COUNT, BSINC_PHASE_COUNT);
/* A 23rd order filter with a -60dB drop at nyquist. */
BsiGenerateTables(output, "bsinc24", 60.0, 23);
- /* An 11th order filter with a -40dB drop at nyquist. */
- BsiGenerateTables(output, "bsinc12", 40.0, 11);
+ /* An 11th order filter with a -60dB drop at nyquist. */
+ BsiGenerateTables(output, "bsinc12", 60.0, 11);
fprintf(output, "} // namespace\n");
if(output != stdout)
|