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 28fd81e..ec3de1b 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);
        }
 }