aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-28 01:58:29 -0700
committerChris Robinson <[email protected]>2019-09-28 01:58:29 -0700
commit882b4acae80f41547a9e16b7def02a972842c857 (patch)
tree3c4474c01bcfc33ef2973f06adb4edca6ea8b5a0 /al
parent00d5356b96d29775653bc6816fafff9cc94ef3ec (diff)
Add "fast" variants for the bsinc resamplers
This simply omits the scale factor from the filter, similar to how up-sampling does. The consequence of this is less smooth transitions when ramping the pitch while down-sampling, but otherwise behaves fine.
Diffstat (limited to 'al')
-rw-r--r--al/state.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/al/state.cpp b/al/state.cpp
index 8f456ed3..d426f022 100644
--- a/al/state.cpp
+++ b/al/state.cpp
@@ -63,7 +63,9 @@ constexpr ALchar alErrOutOfMemory[] = "Out of Memory";
constexpr ALchar alPointResampler[] = "Nearest";
constexpr ALchar alLinearResampler[] = "Linear";
constexpr ALchar alCubicResampler[] = "Cubic";
+constexpr ALchar alFastBSinc12Resampler[] = "11th order Sinc (fast)";
constexpr ALchar alBSinc12Resampler[] = "11th order Sinc";
+constexpr ALchar alFastBSinc24Resampler[] = "23rd order Sinc (fast)";
constexpr ALchar alBSinc24Resampler[] = "23rd order Sinc";
} // namespace
@@ -798,8 +800,9 @@ START_API_FUNC
{
const char *ResamplerNames[] = {
alPointResampler, alLinearResampler,
- alCubicResampler, alBSinc12Resampler,
- alBSinc24Resampler,
+ alCubicResampler, alFastBSinc12Resampler,
+ alBSinc12Resampler, alFastBSinc24Resampler,
+ alBSinc24Resampler
};
static_assert(al::size(ResamplerNames) == static_cast<ALuint>(Resampler::Max)+1,
"Incorrect ResamplerNames list");