diff layer/PianoScale.cpp @ 946:36cddc3de023 alignment_view

Merge from default branch
author Chris Cannam
date Mon, 20 Apr 2015 09:19:52 +0100
parents b66fb15de477
children 4fe7a09be0fe
line wrap: on
line diff
--- a/layer/PianoScale.cpp	Thu Jan 15 16:00:53 2015 +0000
+++ b/layer/PianoScale.cpp	Mon Apr 20 09:19:52 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) {