Make volume control logarithmic again
This commit is contained in:
parent
183ac0f63c
commit
2dea689fa5
@ -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 New Issue
Block a user