]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed the 5.1 speaker layout when using SDL on Win32 (thanks to Willis for the report)
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Jun 2006 09:30:59 +0000 (09:30 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Jun 2006 09:30:59 +0000 (09:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6459 d7cf8633-e32d-0410-b094-e92efae38249

snd_sdl.c

index d30431c5a2f33dae4af7f88eb8e3d23a0e1172c3..b82a56a4737808ff9ffdcf439a933d94711fdac7 100644 (file)
--- a/snd_sdl.c
+++ b/snd_sdl.c
@@ -142,7 +142,16 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
 
        snd_renderbuffer = Snd_CreateRingBuffer(requested, 0, NULL);
        if (snd_channellayout.integer == SND_CHANNELLAYOUT_AUTO)
-               Cvar_SetValueQuick (&snd_channellayout, SND_CHANNELLAYOUT_ALSA);
+       {
+               int newlayout;
+               
+#ifdef __linux__
+               newlayout = SND_CHANNELLAYOUT_ALSA;
+#else
+               newlayout = SND_CHANNELLAYOUT_STANDARD;
+#endif
+               Cvar_SetValueQuick (&snd_channellayout, newlayout);
+       }
 
        sdlaudiotime = 0;
        SDL_PauseAudio( false );