fix sample bits for ALSA
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2265 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
328de3d349
commit
974cf6b3ac
1 changed files with 3 additions and 2 deletions
|
@ -197,7 +197,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
|
||||||
char *pcmname;
|
char *pcmname;
|
||||||
cvar_t *devname;
|
cvar_t *devname;
|
||||||
|
|
||||||
int err, i;
|
int err;
|
||||||
int bps, stereo;
|
int bps, stereo;
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
snd_pcm_hw_params_t *hw;
|
snd_pcm_hw_params_t *hw;
|
||||||
|
@ -255,6 +255,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get sample bit size
|
// get sample bit size
|
||||||
|
sc->sn.samplebits = 16; // TODO: this should be changable by a cvar
|
||||||
bps = sc->sn.samplebits;
|
bps = sc->sn.samplebits;
|
||||||
{
|
{
|
||||||
snd_pcm_format_t spft;
|
snd_pcm_format_t spft;
|
||||||
|
@ -282,7 +283,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
|
||||||
|
|
||||||
// get speaker channels
|
// get speaker channels
|
||||||
stereo = (int)snd_speakers.value;
|
stereo = (int)snd_speakers.value;
|
||||||
if (stereo > 6)
|
if (stereo > 6) // limit channels to 6 (engine limit)
|
||||||
stereo = 6;
|
stereo = 6;
|
||||||
if (!stereo)
|
if (!stereo)
|
||||||
stereo = 2;
|
stereo = 2;
|
||||||
|
|
Loading…
Reference in a new issue