You are not logged in.

#1 2021-08-22 10:43:41

xerxes_
Member
Registered: 2018-04-29
Posts: 385

[SOLVED] Sauerbraten: no sound

When I start Sauerbraten, it starts with this error:

sound init failed: Audio target '' not available

I'm not sure from which update it happens, because I run Sauerbraten not very often but after last Sauerbraten update everything was good.
I use pulse audio, so maybe after some pulse update?
In other programs and games sound works.
This is from journalctrl about sound:

[  117.826059] home pulseaudio[431]: stat('/etc/pulse/default.pa.d'): No such file or directory
[  117.827671] home systemd[321]: Started Sound Service.
[  117.828463] home pulseaudio[431]: GetManagedObjects() failed: org.freedesktop.systemd1.NoSuchUnit: Unit dbus-org.bluez.service not found.

Last edited by xerxes_ (2021-10-14 22:31:07)

Offline

#2 2021-08-30 19:36:14

goldos24
Member
Registered: 2021-08-30
Posts: 1

Re: [SOLVED] Sauerbraten: no sound

This is not a problem with PulseAudio, but with SDL2. There also many games in the AUR that have SDL2 as a dependency and can't get sound to work.
Now, Sauerbraten Sound works perfectly fine on SDL2 Version 2.0.14-1. So you might wanna downgrade it. The exact command (assuming you are root and you didn't clear the pacman cache) would be

pacman -U /var/cache/pacman/pkg/sdl2-2.0.14-1-x86_64.pkg.tar.zst

Offline

#3 2021-08-31 11:18:19

xerxes_
Member
Registered: 2018-04-29
Posts: 385

Re: [SOLVED] Sauerbraten: no sound

But in other games which has sdl2 dependency like hedgewars, xonotic, warsow sound works. I will not downgrade just because of one game.

Last edited by xerxes_ (2021-08-31 11:20:37)

Offline

#4 2021-09-01 04:37:24

Rhubarb
Member
Registered: 2009-08-01
Posts: 33

Re: [SOLVED] Sauerbraten: no sound

I've got a hacky work-around which fixed sauerbraten for me:
edit /usr/bin/sauerbraten-client

Then insert the following lines at the start of the shell script:

export SDL_AUDIODRIVER=alsa
export AUDIODEV pulse

Work smart, not hard.

Offline

#5 2021-09-01 08:08:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,057

Re: [SOLVED] Sauerbraten: no sound

Why are you not just using SDL_AUDIODRIVER=pulseaudio directly which would be loads more efficient than going over the  ALSA bridge? or does that not work? That would be an effective bug of the sdl2 package.

Offline

#6 2021-09-05 15:12:12

scorici
Member
Registered: 2012-02-06
Posts: 16

Re: [SOLVED] Sauerbraten: no sound

I've tried both solution and all work but I will stick with second option:
SDL_AUDIODRIVER=pulseaudio

Better than to downgrade.

Last edited by scorici (2021-09-05 15:12:30)

Offline

#7 2021-09-08 20:21:11

xerxes_
Member
Registered: 2018-04-29
Posts: 385

Re: [SOLVED] Sauerbraten: no sound

The workaround to add 'export SDL_AUDIODRIVER=pulseaudio' to /usr/bin/sauerbraten-client file at the beginning works, but whether I should think about this as solution and mark this thread as solved, I don't know. I think I shouldn't until we have a real solution.

UPDATE:
Actualization to packages: sauerbraten-2020_12_29-1-x86_64.pkg.tar.zst and sauerbraten-data-2020_12_29-1-x86_64.pkg.tar.zst solves problem.

Last edited by xerxes_ (2021-10-14 22:30:18)

Offline

Board footer

Powered by FluxBB