summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2010-09-25 03:28:24 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-09-25 03:28:24 -0400
commitf921166c883f8c02e7d23c5a85ce0c691138d0fe (patch)
treef335eac22209952e24f00f1bfdd9393b93f0645b
parenta14685fd08ed6698350abc96eb1a9f98022c9a72 (diff)
Triangular noise
-rw-r--r--bluenoise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bluenoise.c b/bluenoise.c
index fcf0976..25ab43a 100644
--- a/bluenoise.c
+++ b/bluenoise.c
@@ -5,7 +5,7 @@
#include "fft.h"
-#define N_SAMPLES 256
+#define N_SAMPLES 128
#define K ((2 * M_PI) / N_SAMPLES)
@@ -34,7 +34,7 @@ main ()
{
for (j = 0; j < N_SAMPLES; ++j)
{
- noise[i * N_SAMPLES + j].re = drand48();
+ noise[i * N_SAMPLES + j].re = 0.5 * (drand48() + drand48());
noise[i * N_SAMPLES + j].im = 0;
}
}