diff layer/PianoScale.cpp @ 922:26da827e8fb5 tonioni

Merge from cxx11 branch
author Chris Cannam
date Mon, 23 Mar 2015 11:26:28 +0000
parents b66fb15de477
children 4fe7a09be0fe
line wrap: on
line diff
--- a/layer/PianoScale.cpp	Mon Mar 23 10:04:51 2015 +0000
+++ b/layer/PianoScale.cpp	Mon Mar 23 11:26:28 2015 +0000
@@ -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) {