mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 05:52:41 +00:00
668ea868c4
Use logarithmic sound volume scale instead of linear when interpreting the sound volume value TLDR; we were literally overblowing the speakers with absolute sound volume levels; for the whole story I recommend reading: https://www.dr-lex.be/info-stuff/volumecontrols.html Also play a sound preview when changing the volume in Settings Needs https://github.com/status-im/dotherside/pull/83 Fixes #8426
16 lines
467 B
QML
16 lines
467 B
QML
import QtQuick 2.14
|
|
import QtMultimedia 5.14 as T
|
|
|
|
T.Audio {
|
|
id: audio
|
|
|
|
property var store
|
|
|
|
audioRole: Audio.NotificationRole
|
|
volume: T.QtMultimedia.convertVolume(store.volume,
|
|
T.QtMultimedia.LogarithmicVolumeScale,
|
|
T.QtMultimedia.LinearVolumeScale)
|
|
muted: !store.notificationSoundsEnabled
|
|
onError: console.warn("Audio error:", errorString, "; code:", error)
|
|
}
|