# HG changeset patch # User Chris Cannam # Date 1484322279 0 # Node ID 4f1f3e1a4f63395a6d4baa673bff488d655d6bb3 # Parent 51b6381fc4133b14cca6fdebcdf02aea1e4862e3 Debug toward tracking down strange peak-frequency spectrogram update problem diff -r 51b6381fc413 -r 4f1f3e1a4f63 layer/Colour3DPlotRenderer.cpp --- a/layer/Colour3DPlotRenderer.cpp Fri Jan 13 15:37:07 2017 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Fri Jan 13 15:44:39 2017 +0000 @@ -1047,6 +1047,11 @@ bool logarithmic = (m_params.binScale == BinScale::Log); +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "start = " << start << ", finish = " << finish + << ", step = " << step << endl; +#endif + for (int x = start; x != finish; x += step) { // x is the on-canvas pixel coord; sx (later) will be the @@ -1092,6 +1097,11 @@ if (!pixelPeakColumn.empty()) { +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "found " << peakfreqs.size() << " peak freqs at column " + << sx0 << endl; +#endif + for (FFTModel::PeakSet::const_iterator pi = peakfreqs.begin(); pi != peakfreqs.end(); ++pi) { @@ -1116,10 +1126,19 @@ } m_magRanges.push_back(magRange); + + } else { +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "pixel peak column for range " << sx0 << " to " << sx1 + << " is empty" << endl; +#endif } double fractionComplete = double(columnCount) / double(w); if (timer.outOfTime(fractionComplete)) { +#ifdef DEBUG_COLOUR_PLOT_REPAINT + SVDEBUG << "out of time" << endl; +#endif return columnCount; } }