]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_oss.c
Added snd_channellayout to configure the speaker layout dynamically (0: auto, 1:...
[xonotic/darkplaces.git] / snd_oss.c
index 2693e51b0c4e3ba1863f1dff0a9f3a1ddef5a112..d1bc5d12ee20e579834fb170a8f9bf4955c55b8d 100644 (file)
--- a/snd_oss.c
+++ b/snd_oss.c
@@ -162,12 +162,10 @@ qboolean SndSys_Init (const snd_format_t* requested, snd_format_t* suggested)
                SndSys_Shutdown();
                return false;
        }
-       
-#ifdef __linux__
-       alsaspeakerlayout = true;
-#else
-       alsaspeakerlayout = false;
-#endif
+
+       // TOCHECK: I'm not sure which channel layout OSS uses for 5.1 and 7.1
+       if (snd_channellayout.integer == SND_CHANNELLAYOUT_AUTO)
+               Cvar_SetValueQuick (&snd_channellayout, SND_CHANNELLAYOUT_ALSA);
 
        old_osstime = 0;
        osssoundtime = 0;