Is there a reason you do not use pulseaudio?
I find it easier to configure, but that's not a relevant question on this issue tracker at all - however you can email me or whatever if it interests you enough.
Steam's job isn't to get us all using Pulseaudio and Ubuntu and it should remain as distro-agnostic out of the box as possible.
@Tea23 Realistically, Steam's job is just to supply content to whatever platform and software the developers have made available. The Steam beta, which we are currently all using, is not distro-agnostic. Those features will probably show up later in development when they get the more main-line bugs resolved.
@johndrinkwater: You shouldn't assume that everyone out there uses Pulseaudio.
@MrSchism: Afaik, even on Ubuntu you don't have to use Pulseaudio. It is just installed by default and preferred. I knew some people that had to use Alsa due to some problems with Pulseaudio. (IIRC Pulseaudio still uses Alsa internally, doesn't it?)
But this isn't the only thing where Steam fails to be independent… Steam just shouldn't force users to use some specific software or make decisions instead of them.
Looking at some proprietary packages, e.g. Skype, they depend just on libasound2, nothing else.
@Majkl578: Pulseaudio is audio middleware. It functions on top of alsa and never will replace alsa.
I think it would be really great if you could choose your sound driver and output device.
Kinda like you can with the recording device is steam settings->Voice->Audio input device.
IIRC Valve will be/is using openal for audio. This means that we can have lots of different audio output backends. Now we only need an easy way to select what we want.
It would be really great if we could have something like in the Heroes of Newerth linux client where you can select sound driver and output. Really useful for me because I use OSS4 and have multiple soundcards.
See images.
SDL 2 has a list of preferred audio backends that it walks through. If it can not connect to a running pulseaudio instance, then it continues down the list and eventually tries alsa. If you need SDL 2 to support for an audio backend like JACK or OSSv4, you will need to make sure a system variant of the libraries used by the game(s) is available and is built with support for the backend you want to use.
NOTE: Most games have not been tested against less common audio backends and may have quirk behavior. Your mileage may vary.
SDL_AUDIODRIVERx1 2013-01SDL_AUDIODRIVER=alsa`x1 2013-01
At the moment, due to Ubuntu being the primary target, Steam + TF2 (and presumably all further Source games) also target PulseAudio. On my Arch system, it's necessary for me to export the
SDL_AUDIODRIVERenvironment variable with the value 'alsa' when running Steam. To make this easier, I simply addexport SDL_AUDIODRIVER=alsato the top of/usr/bin/steam.It should be fairly trivial to simply incorporate upstream, a check in the Steam script to find out what sound server the user is running and export
SDL_AUDIODRIVERaccordingly if necessary.Admittedly, I'm not the best BASH monkey in the world so I'm not sure what the check would look like. I imagine, however, Pulse must set some kind of environment variable that we could simply check the existence of in an
ifstatement, and exportSDL_AUDIODRIVERif it doesn't, do nothing if it does. For OSS, I would imagine that the value ofalsain the variable might actually be sufficient if the user has ALSA emulation installed; I'm not sure if the variable would work ifosswas chosen as the variable.Ultimately I believe such a check - or indeed another solution or workaround - would help Steam get closer to true distro-agnosticism.