diff widgets/PropertyBox.cpp @ 946:36cddc3de023 alignment_view

Merge from default branch
author Chris Cannam
date Mon, 20 Apr 2015 09:19:52 +0100
parents 4a578a360011
children 98827470ada2 66da6f009edd
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Thu Jan 15 16:00:53 2015 +0000
+++ b/widgets/PropertyBox.cpp	Mon Apr 20 09:19:52 2015 +0100
@@ -689,7 +689,7 @@
 void
 PropertyBox::playGainChanged(float gain)
 {
-    int dialValue = lrint(log10(gain) * 20.0);
+    int dialValue = int(lrint(log10(gain) * 20.0));
     if (dialValue < -50) dialValue = -50;
     if (dialValue >  50) dialValue =  50;
     emit changePlayGainDial(dialValue);
@@ -703,7 +703,7 @@
     PlayParameters *params = m_container->getPlayParameters();
     if (!params) return;
 
-    float gain = pow(10, float(dialValue) / 20.0);
+    float gain = float(pow(10, float(dialValue) / 20.0));
 
     if (params->getPlayGain() != gain) {
         PlayParameterRepository::EditCommand *command =
@@ -718,7 +718,7 @@
 void
 PropertyBox::playPanChanged(float pan)
 {
-    int dialValue = lrint(pan * 50.0);
+    int dialValue = int(lrint(pan * 50.0));
     if (dialValue < -50) dialValue = -50;
     if (dialValue >  50) dialValue =  50;
     emit changePlayPanDial(dialValue);
@@ -732,9 +732,9 @@
     PlayParameters *params = m_container->getPlayParameters();
     if (!params) return;
 
-    float pan = float(dialValue) / 50.0;
-    if (pan < -1.0) pan = -1.0;
-    if (pan >  1.0) pan =  1.0;
+    float pan = float(dialValue) / 50.f;
+    if (pan < -1.f) pan = -1.f;
+    if (pan >  1.f) pan =  1.f;
 
     if (params->getPlayPan() != pan) {
         PlayParameterRepository::EditCommand *command =
@@ -832,7 +832,7 @@
     QString extraText;
     AudioDial *dial = dynamic_cast<AudioDial *>(w);
     if (dial) {
-        float mv = dial->mappedValue();
+        double mv = dial->mappedValue();
         QString unit = "";
         if (dial->rangeMapper()) unit = dial->rangeMapper()->getUnit();
         if (unit != "") {