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

Audio crackling with Pipewire(possibly also Pulseaudio?) on Raspberry Pi #567

Open
megatog615 opened this issue Jun 27, 2024 · 3 comments
Open

Comments

@megatog615
Copy link

Describe the bug
On Raspberry Pi (in my case a CM4), when using the default SDL_AUDIODRIVER, audio is incredibly crackly. When setting SDL_AUDIODRIVER to "alsa" (SDL_AUDIODRIVER=alsa ./sm64.us.f3dex2e.arm) audio quality is restored.

To Reproduce
SDL will default to using pulse/pipewire (from what I can tell) and will have crackly audio. Launching the game using SDL_AUDIODRIVER=alsa should result in correct audio.

Expected behavior
From what I understand, even using alsa will still have the audio routed to the pipewire daemon. It should produce the same audio on both.

Desktop:
You will need a Raspberry Pi using Raspberry Pi OS with pipewire installed as a sound daemon.

@fgsfdsfgs
Copy link
Collaborator

Wow, I see Pulse hasn't changed at all in 10 years. Anyway, I don't think I can do anything about this other than maybe provide a setting for which audiodriver to use.

@vanfanel
Copy link
Contributor

vanfanel commented Aug 17, 2024

Pulse is a piece of shit. Simply avoid it as much as you can. There's no way around it.
It's not a problem of the engine, indeed: sm64-ex is fantastic and sounds perfectly well on a sane audio stack like plain Alsa.

Pulse is one of those projects that seemed to be tailored to destroy the GNU/Linux ecosystem from inside, and probably it was. His creator is still at it, he's now openly working for Microsoft.

@megatog615
Copy link
Author

Wow, I see Pulse hasn't changed at all in 10 years. Anyway, I don't think I can do anything about this other than maybe provide a setting for which audiodriver to use.

This is a good solution. I'm guessing this would be done with SDL_SetHint?

In any case it is strange that setting the variable to alsa sounds correct even though Pipewire is still intercepting it.

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

3 participants