]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
disable adaptive mixahead when soundtimehack is non-zero (recording,
[xonotic/darkplaces.git] / 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);