redeclipse / base

Base environment for Red Eclipse and associated source files.
https://redeclipse.net/
431 stars 88 forks source link

Sound not working #1434

Closed infdivzero closed 1 year ago

infdivzero commented 1 year ago

I've compiled the latest master, commit 6e2da2c8f610427817160d5bbdb49078e5e1f0c1. Most of the game is functional and plays well but the audio doesn't work. I don't know if it's my setup but previous versions of redeclipse (I've tried 2.0.0 and 1.6.0) have working audio. Sound is not muted anywhere. Audio works for other applications.

Is sound currently broken or how can I get more information from the game on what went wrong?

2023-05-18 19:44.32 Loading SDL..
2023-05-18 19:44.32 Loading eNet..
2023-05-18 19:44.32 Loading game..
2023-05-18 19:44.32 Version: Red Eclipse 2.0.1-nix64-none client (Jupiter Edition) [gnuc-12.2.0]
2023-05-18 19:44.32 Loading video..
2023-05-18 19:44.32 Loading GL..
2023-05-18 19:44.32 Video: AMD Radeon RX 570 Series (polaris10, LLVM 15.0.7, DRM 3.49, 6.1.21_1) (AMD) 4.6 (Core Profile) Mesa 23.0.3
2023-05-18 19:44.32 GLSL: 4.60
2023-05-18 19:44.32 Loading sound..
2023-05-18 19:44.32 Sound: OpenAL Soft (OpenAL Community) 1.1 ALSOFT 1.22.2
2023-05-18 19:44.32 Audio device list:
2023-05-18 19:44.32 - ALSA Default [default]
2023-05-18 19:44.32 - HDA ATI HDMI, HDMI 0 (CARD=HDMI,DEV=3)
2023-05-18 19:44.32 - HDA ATI HDMI, HDMI 1 (CARD=HDMI,DEV=7)
2023-05-18 19:44.32 - HDA ATI HDMI, HDMI 2 (CARD=HDMI,DEV=8)
2023-05-18 19:44.32 - HDA ATI HDMI, HP 24mh (CARD=HDMI,DEV=9)
2023-05-18 19:44.32 - HDA ATI HDMI, HDMI 4 (CARD=HDMI,DEV=10)
2023-05-18 19:44.32 - HDA ATI HDMI, HDMI 5 (CARD=HDMI,DEV=11)
2023-05-18 19:44.32 - HD-Audio Generic, HDMI 0 (CARD=Generic,DEV=3)
2023-05-18 19:44.32 - HD-Audio Generic, HDMI 1 (CARD=Generic,DEV=7)
2023-05-18 19:44.32 - HD-Audio Generic, HDMI 2 (CARD=Generic,DEV=8)
2023-05-18 19:44.32 - HD-Audio Generic, ALCS1200A Analog (CARD=Generic_1,DEV=0)
2023-05-18 19:44.32 - HD-Audio Generic, ALCS1200A Digital (CARD=Generic_1,DEV=1)
2023-05-18 19:44.32 Audio device: ALSA Default [48000]
2023-05-18 19:44.32 Loading defaults..
2023-05-18 19:44.32 Loading world..
2023-05-18 19:44.32 Loading config..
2023-05-18 19:44.32 Failed to load sample: sounds/interface/press
2023-05-18 19:44.32 Failed to load sample: sounds/interface/back
2023-05-18 19:44.32 Failed to load sample: sounds/interface/change
... more samples ...
2023-05-18 19:44.32 Failed to load sample: sounds/interface/ui_hover
2023-05-18 19:44.32 Failed to load sample: sounds/interface/ui_action_long
2023-05-18 19:44.32 Failed to load sample: sounds/interface/ui_fancy_hover
2023-05-18 19:44.32 Configuration loaded
2023-05-18 19:44.32 Could not play music: sounds/theme
2023-05-18 19:44.32 Loading required data..
2023-05-18 19:44.32 Could not load texture: textures/logocrop
2023-05-18 19:44.32 Loading main..
2023-05-18 19:44.33 Display [0]: 1920x1080 [60 Hz] Exclusive: 1920x1080 [1920x1080]
2023-05-18 19:44.35 Could not play music: sounds/theme

Output on the command line:

2023-05-18 19:54.06 Checking working directory: /var/media/data/gitclones/redeclipse
2023-05-18 19:54.06 Added package: data/
2023-05-18 19:54.06 Home directory: /home/stew/.redeclipse/
[ALSOFT] (WW) Querying error state on null context (implicitly 0xa004)
[ALSOFT] (WW) Querying error state on null context (implicitly 0xa004)
infdivzero commented 1 year ago

I've traced a working version back to commit 89cde1a relative to engine/sound.cpp. Commit 718be9e is when the audio stops working for me, when OpenAL is introduced.

It's probably just something with my system, working for everyone else?

Using kiss linux

qreeves commented 1 year ago

Might want to try git submodule foreach 'git pull' first.

infdivzero commented 1 year ago

Had to run git submodule foreach 'git pull origin master' but all the submodules were up to date, still the same result as with the multiple commit versions I've tried since the introduction of OpenAL. I'm using OpenAL 1.22.2 and SDL 2.26.0. I've also tried a fresh git clone of the master branch.

infdivzero commented 1 year ago

It works on my Void Linux install so it's probably missing pipewire or something. The new sound system is awesome btw

qreeves commented 1 year ago

Yeah, gimme a bit and I'll add some more debugging to the error messages so you can find out what the root cause is.

qreeves commented 1 year ago

Alright, pull the latest revision, rebuild, and give it another shot then provide the log file for me.

infdivzero commented 1 year ago

console:

2023-05-19 17:51.06 Checking working directory: /var/media/data/gitclones/redeclipse
2023-05-19 17:51.06 Added package: data/
2023-05-19 17:51.06 Home directory: /home/stew/.redeclipse/
[ALSOFT] (WW) Querying error state on null context (implicitly 0xa004)
[ALSOFT] (WW) Querying error state on null context (implicitly 0xa004)
Fatal error: Fatal signal 11 (Segmentation Violation)

log.txt:

2023-05-19 17:51.06 Loading SDL..
2023-05-19 17:51.06 Loading eNet..
2023-05-19 17:51.06 Loading game..
2023-05-19 17:51.06 Version: Red Eclipse 2.0.1-nix64-none client (Jupiter Edition) [gnuc-12.2.0]
2023-05-19 17:51.06 Loading video..
2023-05-19 17:51.06 Loading GL..
2023-05-19 17:51.06 Video: AMD Radeon RX 570 Series (polaris10, LLVM 15.0.7, DRM 3.49, 6.1.21_1) (AMD) 4.6 (Core Profile) Mesa 23.0.3
2023-05-19 17:51.06 GLSL: 4.60
2023-05-19 17:51.06 Loading sound..
2023-05-19 17:51.06 Sound: OpenAL Soft (OpenAL Community) 1.1 ALSOFT 1.22.2
2023-05-19 17:51.06 Audio device list:
2023-05-19 17:51.06 - ALSA Default [default]
2023-05-19 17:51.06 - HDA ATI HDMI, HDMI 0 (CARD=HDMI,DEV=3)
2023-05-19 17:51.06 - HDA ATI HDMI, HDMI 1 (CARD=HDMI,DEV=7)
2023-05-19 17:51.06 - HDA ATI HDMI, HDMI 2 (CARD=HDMI,DEV=8)
2023-05-19 17:51.06 - HDA ATI HDMI, HP 24mh (CARD=HDMI,DEV=9)
2023-05-19 17:51.06 - HDA ATI HDMI, HDMI 4 (CARD=HDMI,DEV=10)
2023-05-19 17:51.06 - HDA ATI HDMI, HDMI 5 (CARD=HDMI,DEV=11)
2023-05-19 17:51.06 - HD-Audio Generic, HDMI 0 (CARD=Generic,DEV=3)
2023-05-19 17:51.06 - HD-Audio Generic, HDMI 1 (CARD=Generic,DEV=7)
2023-05-19 17:51.06 - HD-Audio Generic, HDMI 2 (CARD=Generic,DEV=8)
2023-05-19 17:51.06 - HD-Audio Generic, ALCS1200A Analog (CARD=Generic_1,DEV=0)
2023-05-19 17:51.06 - HD-Audio Generic, ALCS1200A Digital (CARD=Generic_1,DEV=1)
2023-05-19 17:51.06 Audio device: ALSA Default [48000]
2023-05-19 17:51.06 Loading defaults..
2023-05-19 17:51.06 Loading world..
2023-05-19 17:51.06 Loading config..
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/interface/press
2023-05-19 17:51.06 Failed to create libsndfile context: sounds/interface/press.ogg
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/interface/press.flac
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/interface/press.wav
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/sounds/interface/press
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/sounds/interface/press.ogg
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/sounds/interface/press.flac
2023-05-19 17:51.06 Failed to open virtual IO file: sounds/sounds/interface/press.wav
Fatal signal 11 (Segmentation Violation)
qreeves commented 1 year ago

The crash is my fault, I've just pushed a fix.

Have you got libsndfile installed?

infdivzero commented 1 year ago

I have libsndfile 1.2.0 installed.

log.txt: https://pastebin.com/VkjaycWX

qreeves commented 1 year ago

It looks like your libsndfile is compiled without OGG Vorbis support. You might want to check with the upstream maintainer for your distro.

infdivzero commented 1 year ago

Thanks! It was indeed libsndfile missing ogg support.

qreeves commented 1 year ago

No worries, good luck and have fun 😄