Blob Blame History Raw
--- cmt/src/freeverb/Components/revmodel.cpp~	2000-11-04 10:01:09.000000000 -0800
+++ cmt/src/freeverb/Components/revmodel.cpp	2005-01-28 15:01:46.000000000 -0800
@@ -6,6 +6,15 @@
 
 #include "revmodel.h"
 
+unsigned int rand_state = 1;
+
+inline void add_white_noise (float &val) {
+  rand_state = rand_state * 1234567UL + 890123UL;
+  int mantissa = rand_state & 0x807F0000;
+  int flt_rnd = mantissa | 0x1e999999;
+  val += *reinterpret_cast <const float*> (&flt_rnd);
+}
+
 revmodel::revmodel()
 {
 	// Tie the components to their buffers
@@ -82,6 +91,7 @@
 	{
 		outL = outR = 0;
 		input = (*inputL + *inputR) * gain;
+		add_white_noise(input);
 
 		// Accumulate comb filters in parallel
 		for(i=0; i<numcombs; i++)
@@ -118,6 +128,7 @@
 	{
 		outL = outR = 0;
 		input = (*inputL + *inputR) * gain;
+		add_white_noise(input);
 
 		// Accumulate comb filters in parallel
 		for(i=0; i<numcombs; i++)