From 3c4bfdf7ee8b6694d9c60e95ee1010228b1c0370 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 25 Jul 2008 12:05:30 +0000 Subject: Make sure initial noise doesn't trigger a lot of samples during the first second. --- src/beatmapper.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/beatmapper.cc b/src/beatmapper.cc index e0a6aaf..746f63f 100644 --- a/src/beatmapper.cc +++ b/src/beatmapper.cc @@ -29,7 +29,7 @@ BeatMapper::BeatMapper(Instrument *instrument) { this->instrument = instrument; - for(size_t i = 0; i < HISTORY_SIZE; i++) hist[i] = 0.0; + for(size_t i = 0; i < HISTORY_SIZE; i++) hist[i] = 1.0; C = 1.3; mindist = 2; last = mindist; @@ -46,7 +46,6 @@ Sample *BeatMapper::map(jack_nframes_t nframes) float e = 0.0; for(size_t i = 0; i < nframes; i++) { e += buffer[i] * buffer[i]; - // buffer[i] = 0.0; } float E = 0.0; -- cgit v1.2.3