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

Switch to 4 point 4th order optimal resampling for wavs #46245

Closed
wants to merge 1 commit into from

Conversation

ellenhp
Copy link
Contributor

@ellenhp ellenhp commented Feb 20, 2021

This ports over the resampling algorithm from #46086 to wav files.

Unlike the issue with mp3s and oggs, I've been unable to reproduce any resampling artifacts in wav file resampling even when I force resampling to occur by using wavs that use weird sample rates. This is really odd to me because wavs use linear interpolation instead of cubic like mp3s and oggs did (until recently). And I could very easily hear a difference for oggs and mp3s. To be perfectly honest, without being able to repro the bug I don't think it makes sense to merge this PR, but I'm sending it out anyway because I said I would and I try to stick to my promises 😄 There's also an argument to be made that we should use the same algorithm everywhere like @Calinou said. Plus a lot of the bugs complaining about resampling artifacts make a point to mention it happens with wavs as well. So maybe doing this is a good idea? Not sure.

Notes on the changes:

I think I adjusted DATA_PAD correctly to account for the increased distance I'm looking backwards in the buffer, but I'm not sure of that so I'd appreciate a reviewer taking a critical look at that particular change. Also, perhaps I should be using look-ahead instead of look-behind here?

This should fix #40630 also. I fixed the mono ogg issue in an earlier PR so I think we can call that issue done once the resampling artifacts are taken care of.

@ellenhp ellenhp marked this pull request as ready for review February 20, 2021 04:00
@akien-mga akien-mga added this to the 4.0 milestone Feb 22, 2021
@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Feb 22, 2021
@ellenhp ellenhp closed this Jul 30, 2021
@akien-mga akien-mga added archived and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Jul 30, 2021
@Calinou
Copy link
Member

Calinou commented Jul 30, 2021

Superseded by #51082.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AudioStreamPlayer high-freq artifact, pops, stereo channel corruption
3 participants