From b22df9d2d0d985f7a1c16d48de97a10f61dfc9fd Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 9 Apr 2006 01:59:07 +0000 Subject: [PATCH] LordHavoc is the one for noticing this. By using snd_mixahead.value, the start time was being cast to a float, which eventually resulted in inaccuracies with longer uptimes. This extra cast will ensure starttime is independant of uptime (it's an int). git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2182 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/snd_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index 8981cbcea..c2de01b28 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -1334,7 +1334,7 @@ void S_Update_(soundcardinfo_t *sc) } // mix ahead of current position - endtime = soundtime + _snd_mixahead.value * sc->sn.speed; + endtime = soundtime + (int)(_snd_mixahead.value * sc->sn.speed); // samps = shm->samples >> (shm->numchannels-1); samps = sc->sn.samples / sc->sn.numchannels; if (endtime - soundtime > samps)