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

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 2 comments
Closed

New resampler: ResamplerPadding issues (too large) #2716

SDLBugzilla opened this issue Feb 11, 2021 · 2 comments
Assignees

Comments

@SDLBugzilla
Copy link
Collaborator

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 https://bugzilla.libsdl.org/show_bug.cgi?id=3955 about that.)
@0x1F9F1
Copy link
Contributor

0x1F9F1 commented Aug 22, 2023

This can be closed now (fixed in 9d413df / 88123a5).

@slouken
Copy link
Collaborator

slouken commented Aug 22, 2023

Thanks! 😊

@slouken slouken closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants