aboutsummaryrefslogtreecommitdiffstats
path: root/core/mixer/mixer_c.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-02-23 18:48:02 -0800
committerChris Robinson <[email protected]>2021-02-23 18:48:02 -0800
commit5647aa4042ec64667cd2ba384e30769daa606ab4 (patch)
tree82e42a8a9bc8248d1126a8f4ef1aa8c53cf8b023 /core/mixer/mixer_c.cpp
parent25d25f9a8004ede46349f80225e13feff6a0748c (diff)
Adjust the bsinc filter table packing
Now each scale's filter and phase delta are interleaved for each phase index, followed by the scale and scale+phase delta for each phase index. This ensures no holes in the filter coefficients for the fast bsinc resampler for a given run, while keeping the scale deltas in the same vicinity for the non-fast bsinc resampler.
Diffstat (limited to 'core/mixer/mixer_c.cpp')
-rw-r--r--core/mixer/mixer_c.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/mixer/mixer_c.cpp b/core/mixer/mixer_c.cpp
index 8c2c60c5..f82f7dd1 100644
--- a/core/mixer/mixer_c.cpp
+++ b/core/mixer/mixer_c.cpp
@@ -38,9 +38,9 @@ inline float do_bsinc(const InterpState &istate, const float *RESTRICT vals, con
const uint pi{frac >> FracPhaseBitDiff};
const float pf{static_cast<float>(frac & (FracPhaseDiffOne-1)) * (1.0f/FracPhaseDiffOne)};
- const float *RESTRICT fil{istate.bsinc.filter + m*pi*4};
+ const float *RESTRICT fil{istate.bsinc.filter + m*pi*2};
const float *RESTRICT phd{fil + m};
- const float *RESTRICT scd{phd + m};
+ const float *RESTRICT scd{fil + BSincPhaseCount*2*m};
const float *RESTRICT spd{scd + m};
// Apply the scale and phase interpolated filter.
@@ -58,7 +58,7 @@ inline float do_fastbsinc(const InterpState &istate, const float *RESTRICT vals,
const uint pi{frac >> FracPhaseBitDiff};
const float pf{static_cast<float>(frac & (FracPhaseDiffOne-1)) * (1.0f/FracPhaseDiffOne)};
- const float *RESTRICT fil{istate.bsinc.filter + m*pi*4};
+ const float *RESTRICT fil{istate.bsinc.filter + m*pi*2};
const float *RESTRICT phd{fil + m};
// Apply the phase interpolated filter.