diff options
author | Chris Robinson <[email protected]> | 2017-08-27 10:16:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-08-27 10:16:36 -0700 |
commit | a4d357de06b3860f49f2f6f70899d825b920947b (patch) | |
tree | 3532665177753d3f6d6cb8a5c6a9b702a48d403a /Alc/mixer.c | |
parent | 773d4664ff8f31837374164b64b992b86fcc80f7 (diff) |
Add a higher quality bsinc resampler using 24 sample points
This improves the transition width, allowing more of the higher frequencies
remain audible. It would be preferrable to have an upper limit of 32 points
instead of 48, to reduce the overall table size and the CPU cost for down-
sampling.
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index cf2f96fb..c77488bc 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -142,6 +142,7 @@ ResamplerFunc SelectResampler(enum Resampler resampler) #endif return Resample_fir4_C; case BSinc12Resampler: + case BSinc24Resampler: #ifdef HAVE_NEON if((CPUCapFlags&CPU_CAP_NEON)) return Resample_bsinc_Neon; @@ -169,8 +170,15 @@ void aluInitMixer(void) ResamplerDefault = LinearResampler; else if(strcasecmp(str, "sinc4") == 0) ResamplerDefault = FIR4Resampler; + else if(strcasecmp(str, "bsinc12") == 0) + ResamplerDefault = BSinc12Resampler; + else if(strcasecmp(str, "bsinc24") == 0) + ResamplerDefault = BSinc24Resampler; else if(strcasecmp(str, "bsinc") == 0) + { + WARN("Resampler option \"%s\" is deprecated, using bsinc12\n", str); ResamplerDefault = BSinc12Resampler; + } else if(strcasecmp(str, "cubic") == 0 || strcasecmp(str, "sinc8") == 0) { WARN("Resampler option \"%s\" is deprecated, using sinc4\n", str); |