aboutsummaryrefslogtreecommitdiffstats
path: root/alc/bsinc_defs.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-10-19 07:55:25 -0700
committerChris Robinson <[email protected]>2020-10-19 07:55:25 -0700
commitcdc15a4783e61dd1a838f25dd668e19b28449b19 (patch)
tree57d47a584467c465d7d0ebe2a893f3f5b540ef08 /alc/bsinc_defs.h
parentd6686bceb0d77d32cb496ef44f373a464ffd3fe3 (diff)
Use constexpr variables in place of some macros
Diffstat (limited to 'alc/bsinc_defs.h')
-rw-r--r--alc/bsinc_defs.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/alc/bsinc_defs.h b/alc/bsinc_defs.h
index 30d1219e..179e025d 100644
--- a/alc/bsinc_defs.h
+++ b/alc/bsinc_defs.h
@@ -2,12 +2,15 @@
#define BSINC_DEFS_H
/* The number of distinct scale and phase intervals within the filter table. */
-#define BSINC_SCALE_BITS 4
-#define BSINC_SCALE_COUNT (1<<BSINC_SCALE_BITS)
-#define BSINC_PHASE_BITS 5
-#define BSINC_PHASE_COUNT (1<<BSINC_PHASE_BITS)
+constexpr unsigned int BSincScaleBits{4};
+constexpr unsigned int BSincScaleCount{1 << BSincScaleBits};
+constexpr unsigned int BSincPhaseBits{5};
+constexpr unsigned int BSincPhaseCount{1 << BSincPhaseBits};
-/* The maximum number of sample points for the bsinc filters. */
-#define BSINC_POINTS_MAX 48
+/* The maximum number of sample points for the bsinc filters. The max points
+ * includes the doubling for downsampling, so the maximum number of base sample
+ * points is 24, which is 23rd order.
+ */
+constexpr unsigned int BSincPointsMax{48};
#endif /* BSINC_DEFS_H */