]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
disable adaptive mixahead when soundtimehack is non-zero (recording,
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 05:57:26 +0000 (05:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 05:57:26 +0000 (05:57 +0000)
etc)

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

snd_main.c

index 632009a50c6f4ca681f15cceef05801e086ac5dc..988f0109f81b7ee9b076695b980a232e27878f61 100644 (file)
@@ -1549,7 +1549,10 @@ static void S_PaintAndSubmit (void)
                paintedtime = soundtime;
 
        // mix ahead of current position
-       endtime = soundtime + (unsigned int)(max(_snd_mixahead.value * (float)snd_renderbuffer->format.speed, min(3 * (soundtime - oldsoundtime), 0.3 * (float)snd_renderbuffer->format.speed)));
+       if (soundtimehack)
+               endtime = soundtime + (unsigned int)(_snd_mixahead.value * (float)snd_renderbuffer->format.speed);
+       else
+               endtime = soundtime + (unsigned int)(max(_snd_mixahead.value * (float)snd_renderbuffer->format.speed, min(3 * (soundtime - oldsoundtime), 0.3 * (float)snd_renderbuffer->format.speed)));
        usedframes = snd_renderbuffer->endframe - snd_renderbuffer->startframe;
        maxtime = paintedtime + snd_renderbuffer->maxframes - usedframes;
        endtime = min(endtime, maxtime);