This makes alsa tolerable - don't default to the default.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2534 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2007-07-23 11:11:47 +00:00
parent 0ba5341e4e
commit e4b299af8a

View file

@ -27,6 +27,8 @@
*/
//actually stolen from darkplaces.
//I guess noone can be arsed to write it themselves. :/
//
//This file is otherwise known as 'will the linux jokers please stop fucking over the open sound system please'
#include <alsa/asoundlib.h>
@ -214,8 +216,11 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
hw = alloca(psnd_pcm_hw_params_sizeof());
sw = alloca(psnd_pcm_sw_params_sizeof());
memset(sw, 0, psnd_pcm_sw_params_sizeof());
memset(hw, 0, psnd_pcm_hw_params_sizeof());
devname = Cvar_Get(va("snd_alsadevice%i", cardnum+1), cardnum==0?"default":"", 0, "Sound controls");
//WARNING: 'default' as the default sucks arse. it adds about a second's worth of lag.
devname = Cvar_Get(va("snd_alsadevice%i", cardnum+1), cardnum==0?"hw":"", 0, "Sound controls");
pcmname = devname->string;
if (!*pcmname)