jump to navigation

The PulseAudio Pain January 8, 2010

Posted by audaspace in General.

(If you’re only here to get a solution, scroll down to the heading “The solution”.)

Well, first of all: I didn’t want to do a blog post about this, but there have been so many people having a problem with PulseAudio in connection with OpenAL that I want to place a description of the problem and several ways to solve the issue here now.

What’s the problem with PulseAudio? Well, most audio developers and pro audio users know that PulseAudio actually is crap. It adds unnecessary execution layers to the audio processing with the disadvantage of getting a higher latency and unnecessary waste of CPU cycles (and as such energy and time in the end). PulseAudio is an audio server like ESD and aRts in the older days of Gnome and KDE. The reason for those sound servers  was the fact that with the old linux kernel audio drivers of OSS (Open Sound System) only one application could use sound, except you had a sound card that supported hardware mixing what users rarely had. This was also the reason for sound problems with blender versions before 2.5, they used two different audio libraries (SDL and OpenAL) at the same time and only one could get the device, so either game engine or sequencer audio didn’t work. Back to the sound servers job: They opened the device and all applications played to the sound servers which then mixed the audio and played it. Well as OSS is history now and there is ALSA in the kernel for a long time already which has software mixing, the sound servers job hasn’t to be done anymore and so you don’t need one anymore. KDE was intelligent enough to understand this and removed aRts, while the Gnome project after some time added a new sound server: PulseAudio. Some people might argue now that PulseAudio also brings new features that you normally don’t have like: You can play sounds over the network, set a volume for every application and can connect several sound cards to be presented as one. But the fact is: no typical PC users needs this! Most applications have their own volume setting. ALSA already can present more sound cards as one. And who really needs network over audio should be cute enough to set that up himself (for example by installing PulseAudio if he really needs that, for a terminal server and clients for example). Pro audio users won’t user PulseAudio too, as they will use Jack. Jack is another sound server, but has a different job. With jack you have a lot more control over the audio flow, it also supports MIDI, is realtime suitable (VERY low latency!) and provides other cool things like Jack Transport, with which you are able to start/pause/stop/seek in one application, letting all others do the same.

And now what’s the problem with blender? The problem is not in blender itself, otherwise I could have fixed the issue already for a long time. The problem is in Linux’ OpenAL library (OpenAL soft) that on systems with PulseAudio plays through Pulse. I’ve already talked to Chris (the developer of OpenAL soft, who is a really cool guy, thank you Chris for doing such a great job!) in IRC and he told me that the API of PulseAudio sucks too. He tried to fix the problems that arise with pulse in Version 1.10 and still remaining were fixed in OpenAL soft SVN, but even that one may give you trouble as it seems that it is impossible to prevent race conditions with PulseAudio.

The solution

There are several possible solutions to fix the problem:

1) [My personal recommendation] Uninstall PulseAudio. I won’t tell you any details on how this works, because every distribution has a different package system, but I’m sure you’ll quickly find a step-by-step tutorial with google for your distro.

2) Update OpenAL soft to version 1.11 or compile it yourself from GIT. This might be a bit difficult for beginners and also people who don’t like custom packages on their systems where the distribution doesn’t provide an actual package yet, but still is might be a wanted solution.

3) Configure blender to not use OpenAL. In the user preferences set SDL or None and then save the changes with Ctrl+Alt+U. You might want to restart blender, although with changing the sound device the new setting applies immediately.


1. wpfiend - September 12, 2011

Any chance having a “JACK” option in the Blender User Preferences any time soon? (Along with “None”, “SDL”, and “OpenAL”)


audaspace - September 13, 2011

Jack has been there for 2 years already, you might want to make sure to get a build with Jack.

Sorry comments are closed for this entry

%d bloggers like this: