comparison 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
comparison
equal deleted inserted replaced
68:050d764df239 69:76cc2c424268
159 } 159 }
160 if (shouldSharpen()) { 160 if (shouldSharpen()) {
161 if (m_wlen < 2048) m_wlen = 2048; 161 if (m_wlen < 2048) m_wlen = 2048;
162 } 162 }
163 m_n1 = lrintf(m_n2 / m_ratio); 163 m_n1 = lrintf(m_n2 / m_ratio);
164 if (m_n1 == 0) {
165 m_n1 = 1;
166 m_n2 = m_ratio;
167 }
164 } 168 }
165 169
166 m_transientThreshold = lrintf(m_wlen / 4.5); 170 m_transientThreshold = lrintf(m_wlen / 4.5);
167 171
168 m_totalCount = 0; 172 m_totalCount = 0;
222 QMutexLocker locker(m_mutex); 226 QMutexLocker locker(m_mutex);
223 227
224 size_t formerWlen = m_wlen; 228 size_t formerWlen = m_wlen;
225 m_ratio = ratio; 229 m_ratio = ratio;
226 230
231 std::cerr << "PhaseVocoderTimeStretcher::setRatio: new ratio " << ratio
232 << std::endl;
233
227 calculateParameters(); 234 calculateParameters();
228 235
229 if (m_wlen == formerWlen) { 236 if (m_wlen == formerWlen) {
230 237
231 // This is the only container whose size depends on m_ratio 238 // This is the only container whose size depends on m_ratio