# HG changeset patch # User Chris Cannam # Date 1161004437 0 # Node ID 48182241f5941cf63521926bd84eb05929db4f16 # Parent 793df5f0c6cba6ba778c3a9224d7ecfff065619e * Add spectrum icon * Start range mapper class for use in mapping between e.g. dial positions and underlying values diff -r 793df5f0c6cb -r 48182241f594 layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Thu Oct 12 15:47:38 2006 +0000 +++ b/layer/SpectrogramLayer.cpp Mon Oct 16 13:13:57 2006 +0000 @@ -1936,11 +1936,8 @@ displayMaxFreq = getEffectiveMaxFrequency(); } - //!!! we will probably only want one of "ymag+ydiv" and "ypeak", - //but we leave them both calculated here for test purposes float ymag[h]; float ydiv[h]; - float ypeak[h]; float yval[bins + 1]; //!!! cache this? size_t increment = getWindowIncrement(); @@ -1968,7 +1965,6 @@ for (int y = 0; y < h; ++y) { ymag[y] = 0.f; ydiv[y] = 0.f; - ypeak[y] = 0.f; } float s0 = 0, s1 = 0; @@ -2061,7 +2057,6 @@ if (y == y1i) yprop *= y1 - y; ymag[y] += yprop * value; ydiv[y] += yprop; - if (value > ypeak[y]) ypeak[y] = value; } } @@ -2085,7 +2080,6 @@ float avg = ymag[y] / ydiv[y]; pixel = getDisplayValue(v, avg); -//!!! pixel = getDisplayValue(v, ypeak[y]); assert(x <= m_drawBuffer.width()); QColor c = m_colourMap.getColour(pixel);