mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: Use new getSound function
This commit is contained in:
parent
ce9406c959
commit
3c310f4aa6
2
res.qrc
2
res.qrc
|
@ -7,7 +7,7 @@
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>audio/notification.pcm</file>
|
<file>audio/notification.pcm</file>
|
||||||
<file>audio/ToxicIncomingCall.pcm</file>
|
<file>audio/ToxIncomingCall.pcm</file>
|
||||||
<file>img/add.svg</file>
|
<file>img/add.svg</file>
|
||||||
<file>img/avatar_mask.svg</file>
|
<file>img/avatar_mask.svg</file>
|
||||||
<file>img/contact.svg</file>
|
<file>img/contact.svg</file>
|
||||||
|
|
|
@ -323,7 +323,7 @@ void ChatForm::onAvInvite(uint32_t FriendId, bool video)
|
||||||
Widget::getInstance()->newFriendMessageAlert(FriendId, false);
|
Widget::getInstance()->newFriendMessageAlert(FriendId, false);
|
||||||
Audio& audio = Audio::getInstance();
|
Audio& audio = Audio::getInstance();
|
||||||
audio.startLoop();
|
audio.startLoop();
|
||||||
audio.playMono16Sound(QStringLiteral(":/audio/ToxicIncomingCall.pcm"));
|
audio.playMono16Sound(Audio::getSound(Audio::Sound::IncomingCall));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1338,7 +1338,7 @@ bool Widget::newMessageAlert(QWidget* currentWindow, bool isActive, bool sound,
|
||||||
bool notifySound = Settings::getInstance().getNotifySound();
|
bool notifySound = Settings::getInstance().getNotifySound();
|
||||||
|
|
||||||
if (notifySound && sound && (!isBusy || busySound))
|
if (notifySound && sound && (!isBusy || busySound))
|
||||||
Audio::getInstance().playMono16Sound(QStringLiteral(":/audio/notification.pcm"));
|
Audio::getInstance().playMono16Sound(Audio::getSound(Audio::Sound::NewMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user