1

Topic: [SOLVED] 100% CPU utilization when sound is enabled

I have been working to isolate this problem for some time now. When I run Teeworlds 0.5.1 in Ubuntu with sound enabled, both of my cores are maxed to 100% utilization. When sound is disabled, I see around the same CPU utilization as when I play the game in Windows XP on the same system.

Ubuntu 9.04, nVidia 190.18.03 drivers, alsa 1.0.21
Core 2 Duo, 2.33 GHz
nVidia Quadro 350M

I'm not entirely sure what could be causing this issue, but I imagine it is the way which the game interacts with alsa. I've tried deleting the configuration file and redownloading the game. Please let me know if there is any further information that I can provide on this issue.

Can anyone confirm this behavior? Any ideas as to why it is happening?

2

Re: [SOLVED] 100% CPU utilization when sound is enabled

TeeWorlds standartly uses maximum CPU, it is for giving you best gameplay etc.
Dont understand what do that do with sounds hmm

Goodbye all. Account inactive since March 2011.

3

Re: [SOLVED] 100% CPU utilization when sound is enabled

Teeworlds uses Sdlaudio for the audio output. Which back-end are you using? If you are using Pulseaudio, try to switch to Alsa (ask on Ubuntu forums or check the wiki for the detailed procedure).

4

Re: [SOLVED] 100% CPU utilization when sound is enabled

Thanks so much for your reply, Magnet.

Knowing that it uses Sdlaudio, I did a bit of research. By default Sdlaudio on Ubuntu uses ALSA. By installing the package libsdl1.2debian-pulseaudio, SDL will use pulseaudio by default. Once SDL was using pulseaudio, CPU utilization went back to normal.

For anyone else that may happen to come across this post looking for the solution:

sudo apt-get install libsdl1.2debian-pulseaudio


Thanks again, Magnet. Excellent game you have here!

(And as a side note I may submit either a bug report or idea to the Ubuntu folks to use libsdl1.2debian-pulseaudio as the default SDL package now that they have moved over to pulseaudio.)