diff options
author | deva <deva> | 2008-07-25 12:05:30 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-25 12:05:30 +0000 |
commit | 3c4bfdf7ee8b6694d9c60e95ee1010228b1c0370 (patch) | |
tree | d0b360b6f1499285911d8c975ab065fe8e887b50 /src | |
parent | a30378b8f8381b26f09b8a91243d659257f6dbd6 (diff) |
Make sure initial noise doesn't trigger a lot of samples during the first second.
Diffstat (limited to 'src')
-rw-r--r-- | src/beatmapper.cc | 3 |
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; |