From 92216f0f0757ce7928f9513cbeb79502fbb4287c Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 1 Sep 2005 17:52:57 +0000 Subject: [PATCH] assume a default if sndspeed==0 to stay compatible with the original code --- code/unix/sdl_snd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/unix/sdl_snd.c b/code/unix/sdl_snd.c index 0479a785..e0cc1d7c 100644 --- a/code/unix/sdl_snd.c +++ b/code/unix/sdl_snd.c @@ -136,7 +136,7 @@ qboolean SNDDMA_Init(void) if (!snddevice) { sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE); - sndspeed = Cvar_Get("sndspeed", "22050", CVAR_ARCHIVE); + sndspeed = Cvar_Get("sndspeed", "0", CVAR_ARCHIVE); sndchannels = Cvar_Get("sndchannels", "2", CVAR_ARCHIVE); snddevice = Cvar_Get("snddevice", "/dev/dsp", CVAR_ARCHIVE); } @@ -164,6 +164,7 @@ qboolean SNDDMA_Init(void) tmp = 16; desired.freq = (int) sndspeed->value; + if(!desired.freq) desired.freq = 22050; desired.format = ((tmp == 16) ? AUDIO_S16SYS : AUDIO_U8); // I dunno if this is the best idea, but I'll give it a try...