Jump to content

What kind of audio system does 0 A.D. use?


ShadowOfHassen
 Share

Recommended Posts

This has nothing to do with 0 A.D. but what does 0 A.D. use to play its sound? I've run into a bug on Pop_OS and pipewire and long story short certain programs when ran when rhythmbox or now lollypop is playing music all audio in the program is ran on 2x speed. It was kind of fun to command a horde of Greek chipmunks, and listening to very cheerful music in 0 A.D. but now after a pulse audio update no sound is being played at all.

This isn't anything on 0 A.D. but I'm just wondering, so I have more information to help the devs at system76 and pipewire fix this error

Link to comment
Share on other sites

13 hours ago, ShadowOfHassen said:

... what does 0 A.D. use to play its sound?

I wrote an FAQ answer about the sound system used by 0 A.D. Scroll down and read the answer to "No sound, no audio, or 0 A.D. is the only app with sound". You'll see details on controlling the audio backend used by OpenAL. It could help with troubleshooting or working around chipmunk sound issues.

Edited by Norse_Harold
Link to comment
Share on other sites

oh thank i found a answer to my little audio problem in your faq. cool :

when i switch sound device i always need to restart 0ad. it's not really disturbing. i found now good workaround. but was/is a bit mysterious for me


/etc/openal/alsoft.conf
[pulse]
allow-moves=true

ty

Edited by seeh
  • Thanks 1
Link to comment
Share on other sites

Thanks seeh, and Dunedan, for the idea of changing the openal configuration related to Pulseaudio to enable allow-moves. The default setting is indicated in the commented out setting of the configuration file, but the default setting changed between version 1.19.0 and 1.20.0 of openal-soft. I've updated the FAQ to with this information.

Link to comment
Share on other sites

@vladislavbelov, @Norse_Harold Thanks, strangely enough my steam version of supertux kart does not, neither does my minetest (which also uses open AL) but my flatpak of supertuxkart does. My current theory is its something wrong with pipewire, so no worries on 0 A.D., this problem's for System76 (I have a brand-new computer from them with the issue) and probably pipewire's devs. I'm just trying to gather some info to make their lives easier.

I know when I program with pygame their are different versions of SDL, is there a suspific version of open AL that the a27 runs? Is it different from a26?

 

Link to comment
Share on other sites

On Linux, 0ad uses the operating environment's version of the OpenAL library. If you're running 0ad in a flatpak then the operating environment is a sandbox that likely has a different version of OpenAL from that of the host system. You can start a terminal or bash prompt within the flatpak sandbox and query the version of OpenAL there. Also query the version of OpenAL in the host system. How to query the installed version of a package depends on your distro. It looks like Pop!_OS is based on Ubuntu. Try this command to query the version of OpenAL.

echo 'in host OS:'
dpkg --status libopenal1 | grep '^Version: '

echo 'in flatpak sandbox:'
# start 0ad in the flatpak sandbox. Correct this command if it isn't right.
flatpak run com.play0ad.0ad
flatpak ps
# find 0ad's pid in the above output. Call it PIDOF0AD
flatpak enter PIDOF0AD bash
# now you have a command prompt within the flatpak sandbox prompt
dpkg --status libopenal1 | grep '^Version: '
exit

I haven't tested these commands because I don't have 0 A.D. installed in a flatpak currently. Troubleshooters might also find the output of openal-info useful in both the host system and the flatpak sandbox.

The OpenAL configuration file has some settings related to pipewire. You might check that. The FAQ explains how to find and edit the OpenAL configuration file.

I think that the problem with no audio output is likely not caused by OpenAL, but instead related to exclusive access to audio hardware. Maybe pipewire is trying to use the audio hardware exclusively, and so is PulseAudio. You might uninstall whichever audio system you're not using. Also, sandboxes sometimes need extra permissions in order to access hardware exclusively, or even at all. Trying to run 0 A.D. in a flatpak sandbox and also use pipewire is probably a recipe for all kinds of frustration unless you are quite skilled. Are you able to run 0 A.D. as a non-flatpak version, ie. host system package? Consider using the PPA for 0 A.D.

Edited by Norse_Harold
Link to comment
Share on other sites

On 26/8/2023 at 12:59 AM, Norse_Harold said:

On Linux, 0ad uses the operating environment's version of the OpenAL library. If you're running 0ad in a flatpak then the operating environment is a sandbox that likely has a different version of OpenAL from that of the host system. You can start a terminal or bash prompt within the flatpak sandbox and query the version of OpenAL there. Also query the version of OpenAL in the host system. How to query the installed version of a package depends on your distro. It looks like Pop!_OS is based on Ubuntu. Try this command to query the version of OpenAL.

echo 'in host OS:'
dpkg --status libopenal1 | grep '^Version: '

echo 'in flatpak sandbox:'
# start 0ad in the flatpak sandbox. Correct this command if it isn't right.
flatpak run com.play0ad.0ad
flatpak ps
# find 0ad's pid in the above output. Call it PIDOF0AD
flatpak enter PIDOF0AD bash
# now you have a command prompt within the flatpak sandbox prompt
dpkg --status libopenal1 | grep '^Version: '
exit

I haven't tested these commands because I don't have 0 A.D. installed in a flatpak currently. Troubleshooters might also find the output of openal-info useful in both the host system and the flatpak sandbox.

The OpenAL configuration file has some settings related to pipewire. You might check that. The FAQ explains how to find and edit the OpenAL configuration file.

I think that the problem with no audio output is likely not caused by OpenAL, but instead related to exclusive access to audio hardware. Maybe pipewire is trying to use the audio hardware exclusively, and so is PulseAudio. You might uninstall whichever audio system you're not using. Also, sandboxes sometimes need extra permissions in order to access hardware exclusively, or even at all. Trying to run 0 A.D. in a flatpak sandbox and also use pipewire is probably a recipe for all kinds of frustration unless you are quite skilled. Are you able to run 0 A.D. as a non-flatpak version, ie. host system package? Consider using the PPA for 0 A.D.

I have been using the a27 alpha app image. The only place I can use openAL to run is in flaptak. (Sorry if I wasn't clear) I'm pretty sure it's not a 0 A.D. problem because all my other apt/appimage programs that use open AL are also silent.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...