Ensure some macros have the correct size

This commit is contained in:
Chris Robinson
2017-08-28 05:56:57 -07:00
parent fde02abc35
commit 6c367cad6e
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -1,5 +1,9 @@
/* Generated by bsincgen, do not edit! */
static_assert(BSINC_SCALE_COUNT == 16, "Unexpected BSINC_SCALE_COUNT value!");
static_assert(BSINC_PHASE_COUNT == 16, "Unexpected BSINC_PHASE_COUNT value!");
static_assert(FRACTIONONE == 4096, "Unexpected FRACTIONONE value!");
typedef struct BSincTable {
const float scaleBase, scaleRange;
const int m[BSINC_SCALE_COUNT];
+4 -1
View File
@@ -381,12 +381,15 @@ int main(int argc, char *argv[])
output = stdout;
fprintf(output, "/* Generated by bsincgen, do not edit! */\n\n"
"static_assert(BSINC_SCALE_COUNT == %d, \"Unexpected BSINC_SCALE_COUNT value!\");\n"
"static_assert(BSINC_PHASE_COUNT == %d, \"Unexpected BSINC_PHASE_COUNT value!\");\n"
"static_assert(FRACTIONONE == %d, \"Unexpected FRACTIONONE value!\");\n\n"
"typedef struct BSincTable {\n"
" const float scaleBase, scaleRange;\n"
" const int m[BSINC_SCALE_COUNT];\n"
" const int filterOffset[BSINC_SCALE_COUNT];\n"
" alignas(16) const float Tab[];\n"
"} BSincTable;\n\n");
"} BSincTable;\n\n", BSINC_SCALE_COUNT, BSINC_PHASE_COUNT, FRACTIONONE);
/* A 23rd order filter with a -60dB drop at nyquist. */
BsiGenerateTables(output, "bsinc24", 60.0, 23);
/* An 11th order filter with a -60dB drop at nyquist. */