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

Upsampling noise/crackling #46

Closed
higaski opened this issue Mar 29, 2022 · 2 comments
Closed

Upsampling noise/crackling #46

higaski opened this issue Mar 29, 2022 · 2 comments

Comments

@higaski
Copy link

higaski commented Mar 29, 2022

I've recently written a small application using SDL 2.0.20 and SDL_sound 2.0.1 hoping that this combination would handle resampling reasonably well. However I can't get it to work properly.

I'm opening a device with the following settings:

  • AUDIO_S16LSB
  • 1 channel
  • 44100 Hz

Playing 44.1kHz samples with those settings works like a charm, however everything which needs upsampling (e.g. 11 or 22kHz) sounds horrible. There is a lot of noise and even occasional crackling. It almost sounds like there are samples missing (e.g. due to an off-by-one error or something).

It's definitively not a performance issue, I've even switched to decoding the whole sample upfront just to rule that out.

@higaski higaski changed the title Upsampling distorted (noise/crackling) Upsampling noise/crackling Mar 29, 2022
@higaski
Copy link
Author

higaski commented Mar 31, 2022

libsdl-org/SDL#2663

@higaski higaski closed this as completed Mar 31, 2022
@icculus
Copy link
Owner

icculus commented Apr 4, 2022

As discussed in the SDL bug, the real problem here is likely the lack of SDL_AudioStream use...there's bug open about that: #38

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

2 participants