]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed a problem with snd_renderbuffer->endframe being updated in the
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 28 Feb 2008 03:35:17 +0000 (03:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 28 Feb 2008 03:35:17 +0000 (03:35 +0000)
wrong place, causing windows waveOut audio to fail

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

snd_main.c

index 8d6a1354a4caa600c40f777d56d4f6a9eb5e3948..84e2469e32767baea0c4e2a17bd85901560b0c2a 100644 (file)
@@ -1587,12 +1587,11 @@ static void S_PaintAndSubmit (void)
                S_MixToBuffer(&snd_renderbuffer->ring[startoffset * snd_renderbuffer->format.width * snd_renderbuffer->format.channels], nbframes);
 
                paintedtime += nbframes;
+               snd_renderbuffer->endframe = paintedtime;
        }
        if (!simsound)
                SndSys_UnlockRenderBuffer();
 
-       snd_renderbuffer->endframe = endtime;
-
        // Remove outdated samples from the ring buffer, if any
        if (snd_renderbuffer->startframe < soundtime)
                snd_renderbuffer->startframe = soundtime;