From f8773b8978f72b24fd15f5486dc85d81ced1d5b5 Mon Sep 17 00:00:00 2001 From: Hannu Haahti Date: Mon, 21 Apr 2014 15:40:26 +0300 Subject: [PATCH] Effect: change minimum gate to FLT_MIN This helps reverbs (for example) to not get cut too soon (#424) --- src/core/Effect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/Effect.cpp b/src/core/Effect.cpp index 3fbf8972a..4917ef8fb 100644 --- a/src/core/Effect.cpp +++ b/src/core/Effect.cpp @@ -27,6 +27,7 @@ #include #include +#include #include "Effect.h" #include "engine.h" @@ -135,7 +136,7 @@ void Effect::checkGate( double _out_sum ) { // Check whether we need to continue processing input. Restart the // counter if the threshold has been exceeded. - if( _out_sum <= gate()+0.000001 ) + if( _out_sum <= gate() + FLT_MIN ) { incrementBufferCount(); if( bufferCount() > timeout() )