Mercurial > hg > svgui
changeset 166:48182241f594
* Add spectrum icon
* Start range mapper class for use in mapping between e.g. dial positions
and underlying values
author | Chris Cannam |
---|---|
date | Mon, 16 Oct 2006 13:13:57 +0000 |
parents | 793df5f0c6cb |
children | 53b9c7656798 |
files | layer/SpectrogramLayer.cpp |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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);