Mercurial > hg > svgui
diff layer/PianoScale.cpp @ 944:78c152e4db95
Merge from branch tonioni
author | Chris Cannam |
---|---|
date | Mon, 20 Apr 2015 09:12:17 +0100 |
parents | b66fb15de477 |
children | 4fe7a09be0fe |
line wrap: on
line diff
--- a/layer/PianoScale.cpp Thu Jan 15 10:42:00 2015 +0000 +++ b/layer/PianoScale.cpp Mon Apr 20 09:12:17 2015 +0100 @@ -27,8 +27,8 @@ PianoScale::paintPianoVertical(View *v, QPainter &paint, QRect r, - float minf, - float maxf) + double minf, + double maxf) { int x0 = r.x(), y0 = r.y(), x1 = r.x() + r.width(), y1 = r.y() + r.height(); @@ -39,8 +39,8 @@ for (int i = 0; i < 128; ++i) { - float f = Pitch::getFrequencyForPitch(i); - int y = lrintf(v->getYForFrequency(f, minf, maxf, true)); + double f = Pitch::getFrequencyForPitch(i); + int y = int(lrint(v->getYForFrequency(f, minf, maxf, true))); if (y < y0 - 2) break; if (y > y1 + 2) {