2022-12-08 15:49:14 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtMultimedia 5.14 as T
|
2020-06-30 20:01:37 +00:00
|
|
|
|
2022-12-08 15:49:14 +00:00
|
|
|
T.Audio {
|
2021-10-11 12:41:42 +00:00
|
|
|
id: audio
|
|
|
|
|
2021-12-08 21:20:43 +00:00
|
|
|
property var store
|
2022-02-09 09:43:23 +00:00
|
|
|
|
2020-07-10 18:31:12 +00:00
|
|
|
audioRole: Audio.NotificationRole
|
2022-12-09 15:17:56 +00:00
|
|
|
volume: T.QtMultimedia.convertVolume(store.volume,
|
|
|
|
T.QtMultimedia.LogarithmicVolumeScale,
|
|
|
|
T.QtMultimedia.LinearVolumeScale)
|
2021-12-08 21:20:43 +00:00
|
|
|
muted: !store.notificationSoundsEnabled
|
2022-12-08 15:49:14 +00:00
|
|
|
onError: console.warn("Audio error:", errorString, "; code:", error)
|
2021-10-20 09:50:50 +00:00
|
|
|
}
|