X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=snd_sdl.c;h=5e4157e60b8ca8554c88ee3005a3f0ef11941c40;hb=890d4c00928b263763b460cb6f5b6a828fd4afc7;hp=1b9ef7d641eb62e728a8a874ddfa98808645d62d;hpb=8b57bcb1deffad227731484e52d631277fe3d521;p=xonotic%2Fdarkplaces.git diff --git a/snd_sdl.c b/snd_sdl.c index 1b9ef7d6..5e4157e6 100644 --- a/snd_sdl.c +++ b/snd_sdl.c @@ -89,8 +89,18 @@ qboolean SNDDMA_Init(void) return false; } - for (channels = 8;channels >= 2;channels -= 2) + for (channels = 8;channels >= 1;channels--) { + if ((channels & 1) && channels != 1) + continue; +// COMMANDLINEOPTION: SDL Sound: -sndmono sets sound output to mono + if ((i=COM_CheckParm("-sndmono")) != 0) + if (channels != 1) + continue; +// COMMANDLINEOPTION: SDL Sound: -sndstereo sets sound output to stereo + if ((i=COM_CheckParm("-sndstereo")) != 0) + if (channels != 2) + continue; // Init the SDL Audio subsystem wantspec.callback = Buffer_Callback; wantspec.userdata = NULL; @@ -128,7 +138,7 @@ qboolean SNDDMA_Init(void) as.size = shm->bufferlength; break; } - if (channels < 2) + if (channels < 1) { Con_Print( "Failed to open the audio device!\n" ); Con_DPrintf(