]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
When we're recording a demo, we must not stop rendering sound even when the applicati...
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 10 Jun 2006 14:23:26 +0000 (14:23 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 10 Jun 2006 14:23:26 +0000 (14:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6457 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 86cb8e7a565e789362f72ba432c88bb8275eb210..13c3f72532ebdecbb0ca6430f97a25551106ed08 100644 (file)
@@ -1330,7 +1330,10 @@ static void S_PaintAndSubmit (void)
 {
        unsigned int newsoundtime, paintedtime, endtime, maxtime, usedframes;
 
-       if (snd_renderbuffer == NULL || snd_blocked > 0 || nosound.integer)
+       if (snd_renderbuffer == NULL || nosound.integer)
+               return;
+       
+       if (snd_blocked > 0 && !cls.capturevideo_soundfile)
                return;
 
        // Update sound time
@@ -1379,7 +1382,10 @@ void S_Update(const matrix4x4_t *listenermatrix)
        channel_t *ch, *combine;
        matrix4x4_t basematrix, rotatematrix;
 
-       if (snd_renderbuffer == NULL || snd_blocked > 0 || nosound.integer)
+       if (snd_renderbuffer == NULL || nosound.integer)
+               return;
+       
+       if (snd_blocked > 0 && !cls.capturevideo_soundfile)
                return;
 
        // If snd_swapstereo has changed, recompute the speaker layout