From: molivier Date: Sat, 10 Jun 2006 14:23:26 +0000 (+0000) Subject: When we're recording a demo, we must not stop rendering sound even when the applicati... X-Git-Tag: xonotic-v0.1.0preview~3921 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2faeae42c59c7cd882f90a9617e7d6c5959ee76;p=xonotic%2Fdarkplaces.git When we're recording a demo, we must not stop rendering sound even when the application becomes inactive git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6457 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_main.c b/snd_main.c index 86cb8e7a..13c3f725 100644 --- a/snd_main.c +++ b/snd_main.c @@ -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