diff options
-rw-r--r-- | utils/bsincgen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/bsincgen.c b/utils/bsincgen.c index e4683ded..324e8b04 100644 --- a/utils/bsincgen.c +++ b/utils/bsincgen.c @@ -244,7 +244,7 @@ static void BsiGenerateTables() i += 4 * BSINC_PHASE_COUNT * mt[si];
fprintf(stdout, "/* Generated by bsincgen, do not edit! */\n\n"
-"/* Table of windowed sinc coefficients and deltas. This %dth order filter\n"
+"/* Table of windowed sinc coefficients and deltas. This %d%s order filter\n"
" * has a rejection of -%gdB, yielding a transition width of ~%.3f\n"
" * (normalized frequency). Order increases when downsampling to a limit of\n"
" * one octave, after which the quality of the filter (transition width)\n"
@@ -256,7 +256,11 @@ static void BsiGenerateTables() " const float scaleBase, scaleRange;\n"
" const int m[BSINC_SCALE_COUNT];\n"
" const int filterOffset[BSINC_SCALE_COUNT];\n"
-"} bsinc = {\n", BSINC_ORDER, BSINC_REJECTION, width, log2(1.0/scaleBase), i);
+"} bsinc = {\n", BSINC_ORDER, (((BSINC_ORDER%100)/10) == 1) ? "th" :
+ ((BSINC_ORDER%10) == 1) ? "st" :
+ ((BSINC_ORDER%10) == 2) ? "nd" :
+ ((BSINC_ORDER%10) == 3) ? "rd" : "th",
+ BSINC_REJECTION, width, log2(1.0/scaleBase), i);
fprintf(stdout, " /* Tab */ {\n");
for(si = 0; si < BSINC_SCALE_COUNT; si++)
|