Play sound from python/ALSA instead QtMultimedia
GStreamer sucks
This commit is contained in:
@@ -23,13 +23,8 @@ QtObject {
|
||||
if (Qt.application.state === Qt.ApplicationActive)
|
||||
return
|
||||
|
||||
if (bubble)
|
||||
py.callCoro("desktop_notify", [title, body, image])
|
||||
|
||||
if (sound) {
|
||||
window.mainUI.defaultNotificationSound.seek(0)
|
||||
window.mainUI.defaultNotificationSound.play()
|
||||
}
|
||||
if (bubble) py.callCoro("desktop_notify", [title, body, image])
|
||||
if (sound) py.callCoro("sound_notify")
|
||||
|
||||
if (urgencyHint) {
|
||||
const msec =
|
||||
|
@@ -6,7 +6,6 @@ import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtGraphicalEffects 1.12
|
||||
import QtMultimedia 5.12
|
||||
import "."
|
||||
import "Base"
|
||||
import "MainPane"
|
||||
@@ -36,7 +35,6 @@ Item {
|
||||
return ids
|
||||
}
|
||||
|
||||
readonly property alias defaultNotificationSound: defaultNotificationSound
|
||||
readonly property alias debugConsole: debugConsole
|
||||
readonly property alias mainPane: mainPane
|
||||
readonly property alias pageLoader: pageLoader
|
||||
@@ -116,17 +114,6 @@ Item {
|
||||
font.pointSize: -1
|
||||
}
|
||||
|
||||
Audio {
|
||||
id: defaultNotificationSound
|
||||
|
||||
readonly property string sfx:
|
||||
window.settings.Notifications.default_sound
|
||||
|
||||
audioRole: Audio.NotificationRole
|
||||
volume: window.settings.Notifications.volume / 100
|
||||
source: sfx.trim() === "default.wav" ? "../sounds/default.wav" : sfx
|
||||
}
|
||||
|
||||
IdleManager {
|
||||
id: idleManager
|
||||
}
|
||||
|
Reference in New Issue
Block a user