fix for ALSA

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2264 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-05-09 22:06:28 +00:00
parent 0bb99da40b
commit 328de3d349
1 changed files with 6 additions and 1 deletions

View File

@ -191,6 +191,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
{
snd_pcm_t *pcm;
snd_pcm_uframes_t buffer_size;
extern cvar_t snd_speakers;
soundcardinfo_t *ec; //existing card
char *pcmname;
@ -280,7 +281,11 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
}
// get speaker channels
stereo = sc->sn.numchannels;
stereo = (int)snd_speakers.value;
if (stereo > 6)
stereo = 6;
if (!stereo)
stereo = 2;
err = psnd_pcm_hw_params_set_channels (pcm, hw, stereo);
while (err < 0)
{