Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 1464:66bf1abfefc1
Fix incorrect frequency display in peak-freq mode
author | Chris Cannam |
---|---|
date | Fri, 24 May 2019 14:29:19 +0100 |
parents | 6cf3cb6641e1 |
children | f2525e6cbdf1 |
comparison
equal
deleted
inserted
replaced
1462:6bd413aff85c | 1464:66bf1abfefc1 |
---|---|
1272 | 1272 |
1273 for (int q = q0i; q <= q1i; ++q) { | 1273 for (int q = q0i; q <= q1i; ++q) { |
1274 | 1274 |
1275 for (int s = s0i; s <= s1i; ++s) { | 1275 for (int s = s0i; s <= s1i; ++s) { |
1276 | 1276 |
1277 double binfreq = (double(sr) * q) / m_windowSize; | 1277 double binfreq = (double(sr) * q) / getFFTSize(); |
1278 if (q == q0i) freqMin = binfreq; | 1278 if (q == q0i) freqMin = binfreq; |
1279 if (q == q1i) freqMax = binfreq; | 1279 if (q == q1i) freqMax = binfreq; |
1280 | 1280 |
1281 if (peaksOnly && !fft->isLocalPeak(s, q)) continue; | 1281 if (peaksOnly && !fft->isLocalPeak(s, q)) continue; |
1282 | 1282 |