summaryrefslogtreecommitdiff
path: root/sys/tools/sound
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-05-25 05:23:47 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-05-25 05:23:47 +0000
commit3f9dcc588dca51aa9bbf4ee8dbfe2dd9cb7074ae (patch)
tree05159c706ac8803a11cdb51ecd36f3ab3adb22a0 /sys/tools/sound
parent7e0699952a58200c29c7616afb11766e9398527a (diff)
downloadsrc-test2-3f9dcc588dca51aa9bbf4ee8dbfe2dd9cb7074ae.tar.gz
src-test2-3f9dcc588dca51aa9bbf4ee8dbfe2dd9cb7074ae.zip
Notes
Diffstat (limited to 'sys/tools/sound')
-rw-r--r--sys/tools/sound/snd_fxdiv_gen.awk7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/tools/sound/snd_fxdiv_gen.awk b/sys/tools/sound/snd_fxdiv_gen.awk
index 2e1d3a545380..6e869d071b27 100644
--- a/sys/tools/sound/snd_fxdiv_gen.awk
+++ b/sys/tools/sound/snd_fxdiv_gen.awk
@@ -108,7 +108,10 @@ BEGIN {
printf(" * 508 = SND_CHN_MAX * PCM_32_BPS, which is why....\n");
printf(" */\n\n");
- printf("static const uint32_t snd_fxdiv_table[][2] = {\n");
+ printf("extern const uint32_t snd_fxdiv_table[%d][2];\n\n", SND_MAX_ALIGN + 1);
+
+ printf("#ifdef SND_DECLARE_FXDIV\n");
+ printf("const uint32_t snd_fxdiv_table[%d][2] = {\n", SND_MAX_ALIGN + 1);
for (i = 1; i <= SND_MAX_ALIGN; i++) {
if (aligns[i] != 1)
@@ -120,7 +123,7 @@ BEGIN {
i, r["mul"], r["shift"]);
}
- printf("};\n\n");
+ printf("};\n#endif\n\n");
printf("#define SND_FXDIV_MAX\t\t0x%08x\n", FXONE);
printf("#define SND_FXDIV(x, y)\t\t(((uint32_t)(x) *\t\t\t\\\n");