diff --git a/src/fft.c b/src/fft.c index 1082123..0436c24 100644 --- a/src/fft.c +++ b/src/fft.c @@ -156,7 +156,7 @@ int amp = 0; int first = 0; int last = 1; - int div = 43; + int div = 43/(N_SAMPLES/1024); // 1024 samples -> 43 reads / second double f = bf; while(last <= N_SAMPLES/2) { diff --git a/src/settings.h b/src/settings.h index 15723c3..96209a1 100644 --- a/src/settings.h +++ b/src/settings.h @@ -6,7 +6,7 @@ // number of samples // (POWER OF 2) -#define N_SAMPLES 1024 +#define N_SAMPLES 2048 // if adaptive sampling should be used // (adjust N_SAMPLES to sample rate of current song)