comparison layer/SpectrogramLayer.cpp @ 138:0f1ac9562c76

* revert to using averages
author Chris Cannam
date Tue, 05 Sep 2006 16:34:54 +0000
parents 10a82b2bbb8b
children 40a47de69559
comparison
equal deleted inserted replaced
137:10a82b2bbb8b 138:0f1ac9562c76
2096 if (ydiv[y] > 0.0) { 2096 if (ydiv[y] > 0.0) {
2097 2097
2098 unsigned char pixel = 0; 2098 unsigned char pixel = 0;
2099 2099
2100 float avg = ymag[y] / ydiv[y]; 2100 float avg = ymag[y] / ydiv[y];
2101 //!!! pixel = getDisplayValue(v, avg); 2101 pixel = getDisplayValue(v, avg);
2102 pixel = getDisplayValue(v, ypeak[y]); 2102 //!!! pixel = getDisplayValue(v, ypeak[y]);
2103 2103
2104 assert(x <= m_drawBuffer.width()); 2104 assert(x <= m_drawBuffer.width());
2105 QColor c = m_colourMap.getColour(pixel); 2105 QColor c = m_colourMap.getColour(pixel);
2106 m_drawBuffer.setPixel(x, y, 2106 m_drawBuffer.setPixel(x, y,
2107 qRgb(c.red(), c.green(), c.blue())); 2107 qRgb(c.red(), c.green(), c.blue()));