]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
play silence during timedemos
[xonotic/darkplaces.git] / 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);
                        }
                }
                                *snd_out++ = bound(-32768, val, 32767);
                        }
                }
+
+               // noise is really really annoying
+               if (cls.timedemo)
+                       memset(rb_ptr, 0, nbframes * channels * width);
        }
        else  // 8bit
        {
        }
        else  // 8bit
        {
@@ -161,6 +165,10 @@ static void S_ConvertPaintBuffer(const portable_sampleframe_t *painted_ptr, void
                                *snd_out++ = bound(0, val, 255);
                        }
                }
                                *snd_out++ = bound(0, val, 255);
                        }
                }
+
+               // noise is really really annoying
+               if (cls.timedemo)
+                       memset(rb_ptr, 128, nbframes * channels);
        }
 }
 
        }
 }