Convert volume to the [0.0,1.0] range before sending it to audiomixer 94/21794/2 7.99.3 8.0.0 halibut/7.99.3 halibut/8.0.0 halibut_7.99.3 halibut_8.0.0
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Fri, 28 Jun 2019 15:01:05 +0000 (18:01 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Mon, 1 Jul 2019 11:37:35 +0000 (14:37 +0300)
Fixes setting the volume.

Bug-AGL: SPEC-2473

Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Change-Id: I9a778b88d58faedb4480a70af749500ae083bc29

app/mixer.cpp

index fae2e6a..e37e741 100644 (file)
@@ -49,7 +49,7 @@ void Mixer::setRoleVolume(AudioRole* role)
 
        QJsonObject arg;
        arg.insert("control", role->Name().toLocal8Bit().data());
-       arg.insert("value", QJsonValue(role->Value()));
+       arg.insert("value", QJsonValue(role->Value() / 100.0));
 
        m_client.call("audiomixer", "volume", arg);
 }