mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 20:18:53 +03:00
Make volume control logarithmic again
This commit is contained in:
parent
183ac0f63c
commit
2dea689fa5
2 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue