mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
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:
parent
0bb99da40b
commit
328de3d349
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue