Jump to content

pulseaudio and 0ad on linux


Recommended Posts

  • 2 months later...

hm, what kind of artifacts? Popping/Crackling? Any chance you could record a clip of the output you're hearing?

Same here, but I guess that is kind of expected at this point in the development stage, unless someone tells me otherwise.

Fair point. I will say, though, that OpenAL on Linux has caused disproportionate amounts of trouble - we've noticed several bugs there. OpenAL on Window seems to be much more solid.

Unfortunately I don't know much about diagnosing this. Is it possible to switch to another backend? (See ~/.openalrc)

Link to comment
Share on other sites

I found

https://bugs.launchpad.net/ubuntu/+source/openal/+bug/194919

Sounds like an old bug. I guess I could try building openal from source using a newer version, but I rather just wait for update in the Ubuntu repositories

Man, that sounds terrible, and who knows when they'll actually switch to OpenALsoft. Development on Windows does have a few occasional advantages :)

If you are able to do so, building a recent version of OpenALsoft (e.g. from git or snapshot) would definitely be an improvement.

Link to comment
Share on other sites

who knows when they'll actually switch to OpenALsoft
They did over a year ago, if I'm reading that bug report correctly. Jaunty has 1.4, Karmic has 1.8.
Development on Windows does have a few occasional advantages :)
Well, it has the advantage that it has no automatic package manager and therefore you'd have to compile everything from source manually, and it doesn't have a standard compilation environment so that's usually a huge pain, and so library developers take pity on you and provide pre-compiled binaries that you hope might be compatible with the CRT version you're using :ok:
Link to comment
Share on other sites

  • 2 months later...

hm, what kind of artifacts? Popping/Crackling? Any chance you could record a clip of the output you're hearing?

Same here, but I guess that is kind of expected at this point in the development stage, unless someone tells me otherwise.

Fair point. I will say, though, that OpenAL on Linux has caused disproportionate amounts of trouble - we've noticed several bugs there. OpenAL on Window seems to be much more solid.

Unfortunately I don't know much about diagnosing this. Is it possible to switch to another backend? (See ~/.openalrc)

Not so sure that OpenAL is really the culprit, at least on Ubuntu. You may be surprised to find that Pulse Audio is the actual culprit on Ubuntu, although I do not know what other Linux distributions are using the exact same sound system.

Back when I was using Ubuntu 8.04 (yes it used Pulse Audio) there were no issues with audio performance, especially with OpenAL based programs like UT 04. However when I made the move to Ubuntu 9.10 there was a huge regression in sound performance. For the first time I heard sound crackling and popping non stop in certain programs that I ran (eg UT 04).

The situation was so bad that I was looking for an effective solution that would at least minimise the problems to the point where it couldn't be noticed. Upon looking on the web an article was found on disabling Pulse Audio in Ubuntu 9.04 (same trick applies to 9.10). After going through all of the steps in the article there were noticeable improvements with audio performance. Sound crackling and popping suddenly disappeared, which was first noticed with the OpenAL based programs (eg UT 04).

Do note that following the article on disabling Pulse Audio may not bring about any significant improvements in audio performance, however it is worth a try to see if it improves audio performance in 0AD. Also be aware that this will cause all programs that depend on Pulse Audio to not function properly. This includes the audio control and sound configuration panel (System -> Preferences -> Sound).

Link to comment
Share on other sites

  • 1 month later...

Hello all. My first post on forum :)

I also have problems with sound and popling/crackling using Ubuntu (Karmic).

First I got error:

bt_audio_service_open: connect() failed: Connection refused (111)

popling/crackling and then no sound.

Also I got low fps problem running the game.

I did:

sudo apt-get install libasound2-plugins padevchooser libsdl1.2debian-pulseaudio

sudo apt-get purge bluez-alsa

After reboot sitation is a bit better. I got rid of the "Connection refused (111)" message and low fps complaints. The sound is still crackling but it does not shut down. Also the sound becomes clear if I do nothing, and if I for instance click a unit crackling starts. (?)

I am not familiar with 0 A.D. and do not know how the audio pipe goes (sdl? connection to libasound2.so?). So stumbling and try to learn :)

Please bear with me....

Guess the "bt" in "bt_audio_service_open" refers to bluetooth?

Link to comment
Share on other sites

Welcome :)

I am not familiar with 0 A.D. and do not know how the audio pipe goes (sdl? connection to libasound2.so?)
We just use OpenAL. As I understand it, there are known problems between OpenAL and PulseAudio in Ubuntu that cause problems for quite a few games, and so it should be fixed by Ubuntu people soon (maybe next release or something) and there's nothing we can easily fix ourselves. Not sure if there's anything you can do immediately except disable PulseAudio (and presumably switch to ALSA), which doesn't sound trivially easy.
Link to comment
Share on other sites

Ok solved problem with crackling. Crystal clear sound now all the way.

following this guide:

In the terminal:

sudo gedit /etc/openal/alsoft.conf

change the divice line form Alasa backend stuff to this:

## ALSA backend stuff

##

[alsa]

## device:

# Sets the device name for the default playback device.

device = alsa

remember to un coment it.

Hope this helps.

Edited by risotto77
Link to comment
Share on other sites

Not really sure what is going on, but looks like an OpenAL-alsa-Pulseaudio problem.

AL lib: alsa.c:388: Could not open playback device 'alsa': No such file or directory

SND| alc_init: success, using OSS Software

Maybe better to set OpenAL to use OSS directly with "drivers = oss". With "drivers = pulse" 0 ad will not start at all (black screen).

There is a bug track here suggesting to upgrade alsa. I will try later.

Edit: No I will not try. As far as it works really well with the "drivers = oss" there is no problem. :)

Edited by risotto77
Link to comment
Share on other sites

  • 2 weeks later...
In the terminal:

sudo gedit /etc/openal/alsoft.conf

change the divice line form Alasa backend stuff to this:

## ALSA backend stuff

##

[alsa]

## device:

# Sets the device name for the default playback device.

device = alsa

remember to un coment it.

Hope this helps.

worked for me as long as i used any other device besides pulse. Just thought I'd let you know.

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...