]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
damn, I can't convert hex/dec...
[xonotic/darkplaces.git] / snd_main.c
index 14e2a6a8bb461b53c25b142ab3a68249f4f36fc9..97068e05a87fac7f1db304fb7fa4d54b12e68a46 100644 (file)
@@ -708,7 +708,7 @@ void S_Init(void)
        Cvar_RegisterVariable(&snd_channels);
 
 // COMMANDLINEOPTION: Sound: -nosound disables sound (including CD audio)
-       if (COM_CheckParm("-nosound") || COM_CheckParm("-safe"))
+       if (COM_CheckParm("-nosound"))
                return;
 
        snd_mempool = Mem_AllocPool("sound", 0, NULL);
@@ -1431,9 +1431,6 @@ static void S_PaintAndSubmit (void)
        if (snd_renderbuffer == NULL || nosound.integer)
                return;
 
-       if (snd_blocked > 0 && !cls.timedemo && !(cls.capturevideo.soundrate && !cls.capturevideo.realtime))
-               return;
-
        // Update sound time
        if (cls.timedemo) // SUPER NASTY HACK to mix non-realtime sound for more reliable benchmarking
                newsoundtime = (unsigned int)((double)cl.mtime[0] * (double)snd_renderbuffer->format.speed);
@@ -1442,7 +1439,11 @@ static void S_PaintAndSubmit (void)
        else if (simsound)
                newsoundtime = (unsigned int)((realtime - snd_starttime) * (double)snd_renderbuffer->format.speed);
        else
+       {
                newsoundtime = SndSys_GetSoundTime();
+               if (snd_blocked > 0)
+                       return;
+       }
 
        newsoundtime += extrasoundtime;
        if (newsoundtime < soundtime)
@@ -1506,9 +1507,6 @@ void S_Update(const matrix4x4_t *listenermatrix)
        if (snd_renderbuffer == NULL || nosound.integer)
                return;
 
-       if (snd_blocked > 0 && !cls.timedemo && !(cls.capturevideo.soundrate && !cls.capturevideo.realtime))
-               return;
-
        // If snd_swapstereo or snd_channellayout has changed, recompute the channel layout
        if (current_swapstereo != snd_swapstereo.integer ||
                current_channellayout != snd_channellayout.integer)