]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
a slight cleanup of PaintAndSubmit conditions and S_Update early out
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 May 2007 04:36:28 +0000 (04:36 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 May 2007 04:36:28 +0000 (04:36 +0000)
conditions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7223 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index d3f16b1193666404f169ed6f1220186df4e3e396..97068e05a87fac7f1db304fb7fa4d54b12e68a46 100644 (file)
@@ -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)