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