diff audioio/PhaseVocoderTimeStretcher.cpp @ 69:76cc2c424268

* Update the main sv.prf for compatibility with Qt 4.2 qmake instead of that from 4.1. Add a README.Qt41 describing how to build with 4.1 if preferred. * Add OSC support for control from external scripts etc (work in progress).
author Chris Cannam
date Fri, 10 Nov 2006 13:27:57 +0000
parents e3b32dc5180b
children bedc7517b6e8
line wrap: on
line diff
--- a/audioio/PhaseVocoderTimeStretcher.cpp	Tue Oct 24 11:15:51 2006 +0000
+++ b/audioio/PhaseVocoderTimeStretcher.cpp	Fri Nov 10 13:27:57 2006 +0000
@@ -161,6 +161,10 @@
             if (m_wlen < 2048) m_wlen = 2048;
         }
         m_n1 = lrintf(m_n2 / m_ratio);
+        if (m_n1 == 0) {
+            m_n1 = 1;
+            m_n2 = m_ratio;
+        }
     }
 
     m_transientThreshold = lrintf(m_wlen / 4.5);
@@ -224,6 +228,9 @@
     size_t formerWlen = m_wlen;
     m_ratio = ratio;
 
+    std::cerr << "PhaseVocoderTimeStretcher::setRatio: new ratio " << ratio
+              << std::endl;
+
     calculateParameters();
 
     if (m_wlen == formerWlen) {