From: havoc Date: Wed, 27 Feb 2008 05:57:26 +0000 (+0000) Subject: disable adaptive mixahead when soundtimehack is non-zero (recording, X-Git-Tag: xonotic-v0.1.0preview~2383 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9ecfd1ccbea852ca09831e1a76170e88f2a63754;p=xonotic%2Fdarkplaces.git disable adaptive mixahead when soundtimehack is non-zero (recording, etc) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8139 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_main.c b/snd_main.c index 632009a5..988f0109 100644 --- a/snd_main.c +++ b/snd_main.c @@ -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);