Convert volume to the [0.0,1.0] range before sending it to audiomixer
[apps/mixer.git] / 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);
 }