diff NNLSBase.cpp @ 147:a85e745c0721

attempt to resolve problem of mangitude threshold for small frame sizes
author matthiasm
date Thu, 05 Sep 2013 03:10:30 +0100
parents b547e7238bf5
children d95c4cdef8af
line wrap: on
line diff
--- a/NNLSBase.cpp	Tue Jun 19 16:28:16 2012 +0100
+++ b/NNLSBase.cpp	Thu Sep 05 03:10:30 2013 +0100
@@ -465,7 +465,7 @@
         }
     }
 	
-    if (maxmag < 2) {
+    if (maxmag < m_blockSize * 2.0 / 16384.0) { // this is not quite right, I think
         // cerr << "timestamp " << timestamp << ": very low magnitude, setting magnitude to all zeros" << endl;
         for (int iBin = 0; iBin < static_cast<int>(m_blockSize/2); iBin++) {
             magnitude[iBin] = 0;