From c423b6c8b77354bee82f14c3b22c5d453d257c19 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 7 Jan 2018 05:58:52 -0800 Subject: [PATCH] Remove the sinc4 table --- Alc/ALu.c | 5 ----- OpenAL32/Include/alu.h | 5 ----- native-tools/bsincgen.c | 47 ++++------------------------------------- 3 files changed, 4 insertions(+), 53 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index 1964e6c7..97066737 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -1046,9 +1046,6 @@ static void CalcNonAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *p BsincPrepare(voice->Step, &voice->ResampleState.bsinc, &bsinc24); else if(props->Resampler == BSinc12Resampler) BsincPrepare(voice->Step, &voice->ResampleState.bsinc, &bsinc12); - else - - voice->ResampleState.sinc4.filter = sinc4Tab; voice->Resampler = SelectResampler(props->Resampler); /* Calculate gains */ @@ -1396,8 +1393,6 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALvoiceProps *prop BsincPrepare(voice->Step, &voice->ResampleState.bsinc, &bsinc24); else if(props->Resampler == BSinc12Resampler) BsincPrepare(voice->Step, &voice->ResampleState.bsinc, &bsinc12); - else - voice->ResampleState.sinc4.filter = sinc4Tab; voice->Resampler = SelectResampler(props->Resampler); if(Distance > FLT_EPSILON) diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index c427df0c..2c326327 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -84,13 +84,8 @@ typedef struct BsincState { const ALfloat *filter; } BsincState; -typedef struct Sinc4State { - const ALfloat (*filter)[4]; -} Sinc4State; - typedef union InterpState { BsincState bsinc; - Sinc4State sinc4; } InterpState; typedef const ALfloat* (*ResamplerFunc)(const InterpState *state, diff --git a/native-tools/bsincgen.c b/native-tools/bsincgen.c index 2a7e4326..49102279 100644 --- a/native-tools/bsincgen.c +++ b/native-tools/bsincgen.c @@ -50,6 +50,10 @@ #define log2(x) (log(x) / log(2.0)) #endif +/* Same as in alu.h! */ +#define FRACTIONBITS (12) +#define FRACTIONONE (1<