summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/ui/MxcMediaProxy.cpp3
-rw-r--r--src/ui/MxcMediaProxy.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/MxcMediaProxy.cpp b/src/ui/MxcMediaProxy.cpp
index 4127121b..39fdb155 100644
--- a/src/ui/MxcMediaProxy.cpp
+++ b/src/ui/MxcMediaProxy.cpp
@@ -43,7 +43,8 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
               nhlog::ui()->debug("Set audio output");
               auto newOut = new QAudioOutput(this);
               newOut->setMuted(muted_);
-              newOut->setVolume(volume_);
+              newOut->setVolume(QAudio::convertVolume(
+                volume_, QAudio::LogarithmicVolumeScale, QAudio::LinearVolumeScale));
               setAudioOutput(newOut);
           }
       });
diff --git a/src/ui/MxcMediaProxy.h b/src/ui/MxcMediaProxy.h
index 2e8b2fa1..15606d36 100644
--- a/src/ui/MxcMediaProxy.h
+++ b/src/ui/MxcMediaProxy.h
@@ -59,7 +59,8 @@ public:
     {
         volume_ = val;
         if (auto output = audioOutput()) {
-            output->setVolume(val);
+            output->setVolume(QAudio::convertVolume(
+              val, QAudio::LogarithmicVolumeScale, QAudio::LinearVolumeScale));
         }
         emit volumeChanged();
     }