diff options
author | Chris Robinson <[email protected]> | 2023-02-06 17:46:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-06 17:46:32 -0800 |
commit | da845ddd9c35a1e1fcff03ea342636ae4bb8018b (patch) | |
tree | 8fe219826036410c655b7c732e94f04b442c3261 /core/mixer/defs.h | |
parent | 0de7ea42fa197833bff70b4c370ed29f9859889d (diff) |
Use an interpolated FIR filter for cubic resampling
Similar to how the bsinc filters work, but optimized for 4-point filtering. At
least the SSE version is notably faster than calculating the coefficients in
real time.
Diffstat (limited to 'core/mixer/defs.h')
-rw-r--r-- | core/mixer/defs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/mixer/defs.h b/core/mixer/defs.h index 80d9fc7f..74a474fe 100644 --- a/core/mixer/defs.h +++ b/core/mixer/defs.h @@ -8,6 +8,7 @@ #include "core/bufferline.h" #include "core/resampler_limits.h" +struct CubicCoefficients; struct HrtfChannelState; struct HrtfFilter; struct MixHrtfFilter; @@ -51,7 +52,15 @@ struct BsincState { const float *filter; }; +struct CubicState { + /* Filter coefficients, and coefficient deltas. Starting at phase index 0, + * each subsequent phase index follows contiguously. + */ + const CubicCoefficients *filter; +}; + union InterpState { + CubicState cubic; BsincState bsinc; }; |