From aaef1169830abac6d3ece8a378fd09d690c4afbe Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 18 Apr 2014 14:28:45 +0200 Subject: Increase 'hold' value in auto detection. --- dgedit/canvastoolselections.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dgedit/canvastoolselections.cc b/dgedit/canvastoolselections.cc index 5967a83..8218172 100644 --- a/dgedit/canvastoolselections.cc +++ b/dgedit/canvastoolselections.cc @@ -273,11 +273,11 @@ void CanvasToolSelections::doAutoCreateSelections(bool preview) from++; } - int minsize = 100; // attack. + int hold = 1000; // hold in number of samples int to = i; float runavg = fabs(data[from]); while((runavg > noise_floor || - to < from + minsize) && + to < from + hold) && to < (int)size) { double p = 0.9; runavg = runavg * p + fabs(data[to]) * (1 - p); -- cgit v1.2.3