Make volume control logarithmic again

pull/1662/head
Nicolas Werner 11 months ago
parent 183ac0f63c
commit 2dea689fa5
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 3
      src/ui/MxcMediaProxy.cpp
  2. 3
      src/ui/MxcMediaProxy.h

@ -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);
}
});

@ -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();
}

Loading…
Cancel
Save