aboutsummaryrefslogtreecommitdiffstats
path: root/QW/client/snd_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'QW/client/snd_dma.c')
-rw-r--r--QW/client/snd_dma.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/QW/client/snd_dma.c b/QW/client/snd_dma.c
index 4168315..8554836 100644
--- a/QW/client/snd_dma.c
+++ b/QW/client/snd_dma.c
@@ -77,6 +77,11 @@ cvar_t volume = {"volume", "0.7", true};
cvar_t nosound = {"nosound", "0"};
cvar_t precache = {"precache", "1"};
cvar_t loadas8bit = {"loadas8bit", "0"};
+/* for sdl */
+#if defined(USE_SDL2)
+cvar_t sndspeed = {"sndspeed", "11025", CVAR_NONE};
+cvar_t snd_mixspeed = {"snd_mixspeed", "44100", CVAR_NONE};
+#endif
cvar_t bgmbuffer = {"bgmbuffer", "4096"};
cvar_t ambient_level = {"ambient_level", "0.3"};
cvar_t ambient_fade = {"ambient_fade", "100"};
@@ -146,8 +151,13 @@ void S_Startup (void)
if (!fakedma)
{
+#if defined(USE_SDL2)
+ /* Since I borrowed a lot of the SDL2 code from Quakespasm, I
+ found this to be the easiest way to retrofit it: */
+ rc = SNDDMA_Init(&sn);
+#else
rc = SNDDMA_Init();
-
+#endif
if (!rc)
{
#ifndef _WIN32