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

[patch] New resampler: use real rpadding in SDL_ResampleAudioStream to fix ticking noise #2637

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

Comments

@SDLBugzilla
Copy link
Collaborator

@SDLBugzilla SDLBugzilla commented Feb 11, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.1
Reported for operating system, platform: Windows 10, x86

Comments on the original bug report:

On 2017-09-27 04:01:02 +0000, Eric Wasylishen wrote:

Created attachment 2961
Patch to use real rpadding in SDL_ResampleAudioStream

SDL_ResampleAudioStream is currently passing an rpadding buffer of 0 to SDL_ResampleAudio.. you can hear this as a ticking sound every buffer interval.
(my test case is on Windows 10, system set to 48000Hz, and run "loopwave" playing a 44100Hz wav file.)

I don't know if this is how you'll want to resolve this, but here's one possible way. It delays the stream by "paddingsamples" so there's always that much available at the end of the input to use as "rpadding".

Haven't done any testing yet beyond listening by ear, but I think this fixes all of the artifacts for 44100->48000 resampling.

On 2017-10-10 20:14:10 +0000, Ryan C. Gordon wrote:

I went with a different approach, somewhat along the same lines in https://hg.libsdl.org/SDL/rev/c48ab2c208a2

--ryan.

On 2017-10-11 06:40:08 +0000, Ryan C. Gordon wrote:

*** Bug 3846 has been marked as a duplicate of this bug. ***

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

1 participant