comparison widgets/WindowShapePreview.cpp @ 706:97ea68f62c1f imaf_enc

Merge from default branch
author Chris Cannam
date Thu, 05 Dec 2013 09:47:02 +0000
parents 1a0dfcbffaf1
children 4a578a360011
comparison
equal deleted inserted replaced
678:26c5f7fd4807 706:97ea68f62c1f
175 freqPainter.drawPath(path); 175 freqPainter.drawPath(path);
176 176
177 path = QPainterPath(); 177 path = QPainterPath();
178 freqPainter.setPen(Qt::black); 178 freqPainter.setPen(Qt::black);
179 179
180 // std::cerr << "maxdb = " << maxdb << ", mindb = " << mindb << ", maxval = " <<maxval << std::endl; 180 // cerr << "maxdb = " << maxdb << ", mindb = " << mindb << ", maxval = " <<maxval << endl;
181 181
182 for (int i = 0; i < fftsize/2; ++i) { 182 for (int i = 0; i < fftsize/2; ++i) {
183 float power = output[i][0] * output[i][0] + output[i][1] * output[i][1]; 183 float power = output[i][0] * output[i][0] + output[i][1] * output[i][1];
184 float db = 20 * log10(power); 184 float db = 20 * log10(power);
185 float val = db + -mindb; 185 float val = db + -mindb;