From f2faeae42c59c7cd882f90a9617e7d6c5959ee76 Mon Sep 17 00:00:00 2001 From: molivier Date: Sat, 10 Jun 2006 14:23:26 +0000 Subject: [PATCH] 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 --- snd_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.2