]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
slight change in location of a piece of code, should have no effect
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 16:05:58 +0000 (16:05 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 16:05:58 +0000 (16:05 +0000)
(this makes it closer to the way it was)

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

snd_main.c

index af9c4a303306f51cc53d51af97b0911f5bce0905..8d6a1354a4caa600c40f777d56d4f6a9eb5e3948 100644 (file)
@@ -1550,10 +1550,6 @@ static void S_PaintAndSubmit (void)
        soundtime = newsoundtime;
        recording_sound = (cls.capturevideo.soundrate != 0);
 
-       // Remove outdated samples from the ring buffer, if any
-       if (snd_renderbuffer->startframe < soundtime)
-               snd_renderbuffer->startframe = soundtime;
-
        // Lock submitbuffer
        if (!simsound && !SndSys_LockRenderBuffer())
        {
@@ -1597,6 +1593,10 @@ static void S_PaintAndSubmit (void)
 
        snd_renderbuffer->endframe = endtime;
 
+       // Remove outdated samples from the ring buffer, if any
+       if (snd_renderbuffer->startframe < soundtime)
+               snd_renderbuffer->startframe = soundtime;
+
        if (simsound)
                snd_renderbuffer->startframe = snd_renderbuffer->endframe;
        else