]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
play silence during timedemos
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 Sep 2009 09:39:55 +0000 (09:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 Sep 2009 09:39:55 +0000 (09:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9174 d7cf8633-e32d-0410-b094-e92efae38249

snd_mix.c

index 28fd81ef00ebedccb6ac8df466eea77510dfe3b7..ec3de1b7b6961351e2d6c039d1ac32cd356fc294 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -105,6 +105,10 @@ static void S_ConvertPaintBuffer(const portable_sampleframe_t *painted_ptr, void
                                *snd_out++ = bound(-32768, val, 32767);
                        }
                }
+
+               // noise is really really annoying
+               if (cls.timedemo)
+                       memset(rb_ptr, 0, nbframes * channels * width);
        }
        else  // 8bit
        {
@@ -161,6 +165,10 @@ static void S_ConvertPaintBuffer(const portable_sampleframe_t *painted_ptr, void
                                *snd_out++ = bound(0, val, 255);
                        }
                }
+
+               // noise is really really annoying
+               if (cls.timedemo)
+                       memset(rb_ptr, 128, nbframes * channels);
        }
 }