]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added cls.timedemo check in S_PaintAndSubmit to use cl.mtime[0] for sound sync when...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Apr 2007 11:52:34 +0000 (11:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 11 Apr 2007 11:52:34 +0000 (11:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7079 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 0462d38046de448489b1a4bd4a2970375f096e90..9c6bd696b897f073c8086c1387b1ea951fe22696 100644 (file)
@@ -1435,7 +1435,9 @@ static void S_PaintAndSubmit (void)
                return;
 
        // Update sound time
-       if (cls.capturevideo.soundrate && !cls.capturevideo.realtime) // SUPER NASTY HACK to record non-realtime sound
+       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);
+       else if (cls.capturevideo.soundrate && !cls.capturevideo.realtime) // SUPER NASTY HACK to record non-realtime sound
                newsoundtime = (unsigned int)((double)cls.capturevideo.frame * (double)snd_renderbuffer->format.speed / (double)cls.capturevideo.framerate);
        else if (simsound)
                newsoundtime = (unsigned int)((realtime - snd_starttime) * (double)snd_renderbuffer->format.speed);