VOIP support with ALSA under the UT2004 Linux demo


For a basic x86 box, the easiest solution is to obtain the updated SDL and openal from icculus and to just use them, with the configuration notes below.

If for some reason you want to compile your own openal, perhaps because you are x86-64, you will need the stuff below, however you will still not be able to use the original libSDL due to the noted problems below.


First off I am going to say that this is a technical process that will require some background knowledge that I am not going to attempt to fill in.

You will need to know how to compile a program, and how to setup your mixer, amongst other things.

Getting the source

First you will need to grab the current CVS OpenAL (instructions for getting it are available at www.openal.org).

Then you will need the ALC_EXT_capture patch which is a modified forward port of the important UT2004 OpenAL changes.

With this patch and current CVS you should have the openal source tree used for the shipped ut2004 release, though there may be last minute changes.

Note: The ALSA backend changes to allow for capture are now in the OpenAL CVS tree, and are thus not provided here anymore.

Compiling and installing the source

Once you have the source tree, apply the patch for that tree, then run configure, you'll want --enable-alsa and --enable-capture at minimum, and you'll also probably want --enable-optimize. Compile.

This will give src/libopenal.so.0.0.7.

Shove it in /usr/local/games/ut2004demo/System/openal.so (note: do not copy src/openal.so - it won't work).

Note: You do NOT want the --enable-arch-asm flag to configure at this time, as using it will cause noticable audio artifacts.


NOTE: This section only applies to the UT2004 Demo and not to the retail version.

Now, there is a mix of two nasty gotchas that will keep this from working with ut2004, even though it will now work with anything else.

The libSDL-1.2.so.0 that comes with ut2004 is staticly compiled against an older version of libasound, and my openal patch is for use with ALSA 1.0.2, this alone would not be a problem because the libSDL symbols are unversioned, and the openal undefined symbols are versioned.

But then we hit a nasty dynamic linker bug, which causes it to feed the unversioned symbols to openal, this of course causes all hell to break loose.

The solution is simple, replace the libSDL-1.2.so.0 that comes with ut2004 with one not compiled against ALSA, or at least one with versioned ALSA symbols; the SDL shipped with most distributions fits the bill just fine. (As does the updated libSDL.)

Your ~/.openalrc

Hopefully needless to say, you will need a valid ~/.openalrc file.

It will need the following:

You may need to tweak the in and out device lines some for your specific setup, on my Live! Value with a surround setup I use (define alsa-out-device "surround40:0,0") and (define alsa-in-device "hw:0,0").

Finishing Off

Now that we have that out of the way, we are down to the minor stuff:

Final Words

That's it, if you have any problems email me, user warp, host babylon.d2dc.net.

I am also currently available for contract work, see my resume for a list of qualifications.

NOTE: If you are having problems, I strongly suggest adding --enable-debug-maximus to the configure line, recompiling, and including the full output of running ut2004 and the contents of ~/.ut2004demo/System/UT2004.log in the bug report.

Copyright and credits

This page Copyright (C) 2004 Zephaniah E. Hull and Dave Wickham.

Thanks to Dave Wickham for the xhtml formatting.

The forward port patch seems to be Copyright (C) 2004 Ryan C. Gordon and (minimally) Zephaniah E. Hull.