From: havoc Date: Wed, 2 May 2007 04:36:28 +0000 (+0000) Subject: a slight cleanup of PaintAndSubmit conditions and S_Update early out X-Git-Tag: xonotic-v0.1.0preview~3223 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40a5b305874736701d071232c6a422854a217466;p=xonotic%2Fdarkplaces.git a slight cleanup of PaintAndSubmit conditions and S_Update early out conditions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7223 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_main.c b/snd_main.c index d3f16b11..97068e05 100644 --- a/snd_main.c +++ b/snd_main.c @@ -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)