From 2ea5030958d2bf47fbedc2294c46677881b62a6a Mon Sep 17 00:00:00 2001 From: sudden6 Date: Mon, 26 Aug 2019 23:08:54 +0200 Subject: [PATCH] fix(widget): don't try to play audio if it's disable --- src/widget/widget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index eaf9a0590..5049da7c9 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -1008,6 +1008,11 @@ void Widget::setStatusMessage(const QString& statusMessage) */ void Widget::playNotificationSound(IAudioSink::Sound sound, bool loop) { + if (!settings.getAudioOutDevEnabled()) { + // don't try to play sounds if audio is disabled + return; + } + if (audioNotification == nullptr) { audioNotification = std::unique_ptr(audio.makeSink()); if (audioNotification == nullptr) {