1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(widget): don't try to play audio if it's disable

This commit is contained in:
sudden6 2019-08-26 23:08:54 +02:00
parent 2bba12175e
commit 2ea5030958
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -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<IAudioSink>(audio.makeSink());
if (audioNotification == nullptr) {