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())
{
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