aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h15
-rw-r--r--OpenAL32/alState.c2
2 files changed, 12 insertions, 5 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index e5fd8b09..b322995b 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -24,16 +24,17 @@
#define MAX_PITCH (255)
/* Maximum number of buffer samples before the current pos needed for resampling. */
-#define MAX_PRE_SAMPLES 12
+#define MAX_PRE_SAMPLES 24
/* Maximum number of buffer samples after the current pos needed for resampling. */
-#define MAX_POST_SAMPLES 12
+#define MAX_POST_SAMPLES 24
#ifdef __cplusplus
extern "C" {
#endif
+struct BSincTable;
struct ALsource;
struct ALbufferlistitem;
struct ALvoice;
@@ -54,8 +55,9 @@ enum Resampler {
LinearResampler,
FIR4Resampler,
BSinc12Resampler,
+ BSinc24Resampler,
- ResamplerMax = BSinc12Resampler
+ ResamplerMax = BSinc24Resampler
};
extern enum Resampler ResamplerDefault;
@@ -91,13 +93,16 @@ typedef union InterpState {
Sinc4State sinc4;
} InterpState;
-ALboolean BsincPrepare(const ALuint increment, BsincState *state);
-
typedef const ALfloat* (*ResamplerFunc)(const InterpState *state,
const ALfloat *restrict src, ALsizei frac, ALint increment,
ALfloat *restrict dst, ALsizei dstlen
);
+ALboolean BsincPrepare(const ALuint increment, BsincState *state, const struct BSincTable *table);
+
+extern const struct BSincTable bsinc12;
+extern const struct BSincTable bsinc24;
+
typedef union aluVector {
alignas(16) ALfloat v[4];
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 19b0996c..f71f0eac 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -52,6 +52,7 @@ static const ALchar alPointResampler[] = "Nearest";
static const ALchar alLinearResampler[] = "Linear";
static const ALchar alSinc4Resampler[] = "4-Point Sinc";
static const ALchar alBSinc12Resampler[] = "Band-limited Sinc (12/24)";
+static const ALchar alBSinc24Resampler[] = "Band-limited Sinc (24/48)";
AL_API ALvoid AL_APIENTRY alEnable(ALenum capability)
{
@@ -751,6 +752,7 @@ AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index)
const char *ResamplerNames[] = {
alPointResampler, alLinearResampler,
alSinc4Resampler, alBSinc12Resampler,
+ alBSinc24Resampler,
};
const ALchar *value = NULL;
ALCcontext *context;