Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New resampler: ResamplerPadding issues (too large) #2716

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

New resampler: ResamplerPadding issues (too large) #2716

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments


Copy link

SDLBugzilla commented Feb 11, 2021

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.7
Reported for operating system, platform: Other, x86

Comments on the original bug report:

On 2017-11-11 18:49:13 +0000, Eric Wasylishen wrote:

Two issues:

  • ResamplerPadding is using RESAMPLER_SAMPLES_PER_ZERO_CROSSING=512 - I think this should be RESAMPLER_ZERO_CROSSINGS=5. ie: 512 is the "oversampling factor" for the full filter table, so linear interpolation on it will work. But 5 is the actual size of the interpolated kernel that SDL_ResampleAudio uses.

Fixing this should remove 11ms of audio latency assuming input is 44100Hz, I think?

  • The "if (inrate > outrate)" part is related to the part of the "band-limited resampling" paper that says - "if rho < 1... the step-size through the filter table is reduced.." i.e. about lowering the cutoff frequency based on the output sample rate. However this is not implemented in SDL_ResampleAudio so I would just delete it until it is. (I just filed about that.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants