stratagus icon indicating copy to clipboard operation
stratagus copied to clipboard

Linux. SDL couldn't open audio for ALSA.

Open ipochto opened this issue 10 months ago • 2 comments

There is no audio at all.

master branch. ArchLinux. ALSA. Issue appears for both - compiled with vendored or system wide installed SDL:

[...]/stratagus/src/sound/sound_server.cpp:712: InitSdlSound: Couldn't open audio: No default audio device available

Probably some local problem, as there is information that on at least one linux machine the sound works.

*Created it so don't forget, then I'll add description after more detailed research.

ipochto avatar Apr 15 '25 13:04 ipochto

Do your log have something like

Supported sound decoders: WAVE AIFF VOC MOD MID OGG OPUS MP3 FLAC Supported music decoders: WAVE FLAC OGG OPUS MPG123 MODPLUG NATIVEMIDI MOD MIDI MP3

Jarod42 avatar Apr 15 '25 13:04 Jarod42

It is definitely ALSA-related issue. Switched to PipeWire - problem's gone.

With ALSA:

src/stratagus/script.cpp:2056: InitLua: mobdebug loaded and available via mobdebug.start()
src/sound/sound_server.cpp:712: InitSdlSound: Couldn't open audio: No default audio device available

# here should be supported decoders!

Loading 'data.wargus/scripts/stratagus.lua'

With PipeWire:

src/stratagus/script.cpp:2056: InitLua: mobdebug loaded and available via mobdebug.start()
Supported sound decoders: WAVE AIFF VOC OGG OPUS MP3
Supported music decoders: CMD WAVE OGG OPUS MINIMP3 MPG123 MP3
Loading 'data.wargus/scripts/stratagus.lua'

ipochto avatar Apr 15 '25 14:04 ipochto