diff options
author | Chris Robinson <[email protected]> | 2017-08-16 02:45:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-08-16 02:45:25 -0700 |
commit | f9c09cc845b786705b43b39300d8706db7ab0054 (patch) | |
tree | 7cbc0b883b916c971390cf48fe2a76199267a1c9 /OpenAL32/Include | |
parent | 520dd5c77972cad13d1a97e228903b3c5bdc384f (diff) |
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.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alu.h | 11 |
1 files changed, 5 insertions, 6 deletions
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 { |