summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2008-07-25 12:05:30 +0000
committerdeva <deva>2008-07-25 12:05:30 +0000
commit3c4bfdf7ee8b6694d9c60e95ee1010228b1c0370 (patch)
treed0b360b6f1499285911d8c975ab065fe8e887b50
parenta30378b8f8381b26f09b8a91243d659257f6dbd6 (diff)
Make sure initial noise doesn't trigger a lot of samples during the first second.
-rw-r--r--src/beatmapper.cc3
1 files changed, 1 insertions, 2 deletions
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;