]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_dma.c
add an error check for invalid maxfrac before returning it, nothing significant
[xonotic/darkplaces.git] / snd_dma.c
index 8be8dd7ac0aa90d2f5423126e97a9116882d97a1..0e91d01085ea880e64c443fef90e0f35c872fc60 100644 (file)
--- a/snd_dma.c
+++ b/snd_dma.c
@@ -170,7 +170,7 @@ void S_Init (void)
        Cvar_RegisterVariable(&volume);
        Cvar_RegisterVariable(&bgmvolume);
 
-       if (COM_CheckParm("-nosound"))
+       if (COM_CheckParm("-nosound") || COM_CheckParm("-safe"))
                return;
 
        snd_mempool = Mem_AllocPool("sound");
@@ -1135,3 +1135,8 @@ void S_ResampleBuffer16Stereo(short *input, int inputlength, short *output, int
        else
                memcpy(output, input, inputlength * sizeof(short[2]));
 }
+
+int S_RawSamples_SampleRate(void)
+{
+       return shm != NULL ? shm->speed : 0;
+}