From 974cf6b3ac103699d2dc035ed255ddce938e3f83 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Tue, 9 May 2006 22:31:23 +0000 Subject: [PATCH] fix sample bits for ALSA git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2265 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/snd_alsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/client/snd_alsa.c b/engine/client/snd_alsa.c index 2cc7591b4..ee2e3c8e5 100755 --- a/engine/client/snd_alsa.c +++ b/engine/client/snd_alsa.c @@ -197,7 +197,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum) char *pcmname; cvar_t *devname; - int err, i; + int err; int bps, stereo; unsigned int rate; snd_pcm_hw_params_t *hw; @@ -255,6 +255,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum) } // get sample bit size + sc->sn.samplebits = 16; // TODO: this should be changable by a cvar bps = sc->sn.samplebits; { snd_pcm_format_t spft; @@ -282,7 +283,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum) // get speaker channels stereo = (int)snd_speakers.value; - if (stereo > 6) + if (stereo > 6) // limit channels to 6 (engine limit) stereo = 6; if (!stereo) stereo = 2;