| Summary: | [patch] New resampler: use real rpadding in SDL_ResampleAudioStream to fix ticking noise | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Eric Wasylishen <ewasylishen> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | nagydavid91, sezeroz |
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Windows 10 | ||
| Attachments: | Patch to use real rpadding in SDL_ResampleAudioStream | ||
I went with a different approach, somewhat along the same lines in https://hg.libsdl.org/SDL/rev/c48ab2c208a2 --ryan. |
Created attachment 2961 [details] 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.