mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 07:02:12 +00:00
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:
parent
0ba5341e4e
commit
e4b299af8a
1 changed files with 6 additions and 1 deletions
|
@ -27,6 +27,8 @@
|
||||||
*/
|
*/
|
||||||
//actually stolen from darkplaces.
|
//actually stolen from darkplaces.
|
||||||
//I guess noone can be arsed to write it themselves. :/
|
//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>
|
#include <alsa/asoundlib.h>
|
||||||
|
|
||||||
|
@ -214,8 +216,11 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
|
||||||
|
|
||||||
hw = alloca(psnd_pcm_hw_params_sizeof());
|
hw = alloca(psnd_pcm_hw_params_sizeof());
|
||||||
sw = alloca(psnd_pcm_sw_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;
|
pcmname = devname->string;
|
||||||
|
|
||||||
if (!*pcmname)
|
if (!*pcmname)
|
||||||
|
|
Loading…
Reference in a new issue