Fix master volume slider 81/22281/1
authorScott Murray <scott.murray@konsulko.com>
Fri, 30 Aug 2019 15:30:43 +0000 (11:30 -0400)
committerScott Murray <scott.murray@konsulko.com>
Fri, 30 Aug 2019 15:34:45 +0000 (11:34 -0400)
The switch to using agl-service-audiomixer missed a scaling to 0.0 - 1.0
for the value requested when changing the master volume slider, add that
to fix it.  Also, change the displayed name back to "Master Volume" to
match what it now represents with PipeWire.

Bug-AGL: SPEC-2788

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I2fb94d161499b759540105958bcb3d6f5da1884f

homescreen/qml/MediaAreaBlank.qml
homescreen/src/mastervolume.cpp

index 347c26a..ebddb0c 100644 (file)
@@ -87,7 +87,7 @@ Image {
             font.pixelSize: 36
             anchors.horizontalCenter: parent.horizontalCenter
             color: "white"
-            text: qsTr("Active Volume")
+            text: qsTr("Master Volume")
         }
 
         RowLayout {
index 5a6dc9a..98b884d 100644 (file)
@@ -47,7 +47,8 @@ void MasterVolume::setVolume(qint32 volume)
                m_volume = volume;
                QJsonObject arg;
                arg.insert("control", "Master");
-               arg.insert("value", volume);
+               double v = (double) volume / 100.0;
+               arg.insert("value", v);
                m_client.call("audiomixer", "volume", arg);
        }
 }