From f9c09cc845b786705b43b39300d8706db7ab0054 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 16 Aug 2017 02:45:25 -0700 Subject: Simplify bsinc filter storage in the filter state Rather than storing individual pointers to filter, scale delta, phase delta, and scale phase delta entries, per phase index, the new table layout makes it trivial to access the per-phase filter and delta entries given the base offset and coefficient count. --- OpenAL32/Include/alu.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 57c85ad0..78f05b63 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -73,12 +73,11 @@ typedef struct BsincState { ALfloat sf; /* Scale interpolation factor. */ ALsizei m; /* Coefficient count. */ ALint l; /* Left coefficient offset. */ - struct { - const ALfloat *filter; /* Filter coefficients. */ - const ALfloat *scDelta; /* Scale deltas. */ - const ALfloat *phDelta; /* Phase deltas. */ - const ALfloat *spDelta; /* Scale-phase deltas. */ - } coeffs[BSINC_PHASE_COUNT]; + /* Filter coefficients, followed by the scale, phase, and scale-phase + * delta coefficients. Starting at phase index 0, each subsequent phase + * index follows contiguously. + */ + const ALfloat *filter; } BsincState; typedef union InterpState { -- cgit v1.2.3