diff options
author | Chris Robinson <[email protected]> | 2017-08-28 05:56:57 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-08-28 05:56:57 -0700 |
commit | 6c367cad6e358a0ea4fd71fc94120dd7e036c621 (patch) | |
tree | 1c92d6691a3c7f4f1f6ef95f65551e2a87a87ff9 /utils/bsincgen.c | |
parent | fde02abc359d81f7c25d6d24ac747613537efb1f (diff) |
Ensure some macros have the correct size
Diffstat (limited to 'utils/bsincgen.c')
-rw-r--r-- | utils/bsincgen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/bsincgen.c b/utils/bsincgen.c index 945a99eb..03421da9 100644 --- a/utils/bsincgen.c +++ b/utils/bsincgen.c @@ -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. */
|