Technical support > Linux

No music in game (installed from deb's)

<< < (6/6)

Kildor:
no. at all.

QkiZ:
Ok, in dev version sound play clearly, but graphics are broken http://ufoai.ninex.info/forum/index.php?topic=4400.0

Andrew.Smart:

--- Quote from: QkiZ on January 19, 2010, 03:11:51 pm ---
--- Code: ---SDL_AUDIODRIVER=pulse ufo
--- End code ---
Nothing has changed. Game is still using alsa. Sound crackling.

--- End quote ---
All right, sorry to raise an old thread but I found a solution to this same problem.  I solved this over a year or two ago but after a reinstall I forgot the solution... so after a few hours of meditation and tinkering I'm writing the solution down here.


--- Code: ---sudo aptitude install libsdl1.2debian-pulseaudio
--- End code ---

After you've installed that package "Simple DirectMedia Layer (with X11 and PulseAudio options)", start up UFO:AI and you will notice the sound is much better (You will see in the log that pulse is used instead of alsa); but the sound is still somewhat cracky.  Within UFO:AI, change the Audio Sample Rate option from 44100 to 48000; you will notice the sound is less cracky, and plays slightly slower.

To eliminate the crackiness, we need to set PulseAudio to operate internally at a sample rate of 48000 Hz.  To do this, edit /etc/pulse/daemon.conf

--- Code: ---sudo vim /etc/pulse/daemon.conf
--- End code ---
Then look for this line:

--- Code: ---; default-sample-rate = 44100
--- End code ---
And add this line below it:

--- Code: ---default-sample-rate = 48000
--- End code ---

No need to restart anything!  export SDL_AUDIODRIVER=pulse then start up UFO:AI to hear crystal clear sound while using PulseAudio!

--- Code: ---SDL_AUDIODRIVER=pulse ufo
--- End code ---

I think the crackly noise thing has effected me since the 2.2.1 release, all the way up to the current revision (31875); I'm fairly sure it has to do with the relationship between PulseAudio and the Simple DirectMedia Layer Library; it isn't a UFO:AI bug.  I suppose a bug report could be filled if the related UFO:AI deb's don't have libsdl1.2debian-pulseaudio as a dependency; but that might have pulse as a dependency and some people don't want that.

Edit: Hmmm... still an occasional tiny glitch in the audio...

Navigation

[0] Message Index

[*] Previous page

Go to full version