diff options
author | Chris Robinson <[email protected]> | 2020-04-01 23:17:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-02 00:49:19 -0700 |
commit | 8853519d896f11b678873f0afacac16b3cdebc27 (patch) | |
tree | 319fd5c5a5978e7790bbd22844c9e218b2bbe10e /alc/voice.h | |
parent | 6fb59f1182965a0e1e45d60e81e3ff02db45944c (diff) |
Generate the bsinc tables using constexpr methods
All the methods used should be compliant with C++14 constexpr rules. However,
the number of scales and phases cause GenerateBSincCoeffs to reach the allowed
step limit, preventing full compile-time generation. It's not a terribly big
deal, it'll generate them very quickly when loading, but it does prevent using
shared read-only memory pages.
Diffstat (limited to 'alc/voice.h')
-rw-r--r-- | alc/voice.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/alc/voice.h b/alc/voice.h index 7adffe7f..f4d09ad3 100644 --- a/alc/voice.h +++ b/alc/voice.h @@ -44,16 +44,9 @@ enum class Resampler { }; extern Resampler ResamplerDefault; -/* The number of distinct scale and phase intervals within the bsinc 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) -/* Interpolator state. Kind of a misnomer since the interpolator itself is - * stateless. This just keeps it from having to recompute scale-related +/* Interpolator state. Kind of a misnomer since the interpolator itself is + * stateless. This just keeps it from having to recompute scale-related * mappings for every sample. */ struct BsincState { |