From 3c310f4aa68ee7db0caff5144096550c13a9c320 Mon Sep 17 00:00:00 2001 From: Alice Weigt Date: Wed, 26 Oct 2016 02:17:08 -0700 Subject: [PATCH] refactor: Use new getSound function --- .../{ToxicIncomingCall.pcm => ToxIncomingCall.pcm} | Bin res.qrc | 2 +- src/widget/form/chatform.cpp | 2 +- src/widget/widget.cpp | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename audio/{ToxicIncomingCall.pcm => ToxIncomingCall.pcm} (100%) diff --git a/audio/ToxicIncomingCall.pcm b/audio/ToxIncomingCall.pcm similarity index 100% rename from audio/ToxicIncomingCall.pcm rename to audio/ToxIncomingCall.pcm diff --git a/res.qrc b/res.qrc index 4b0e6fffc..e3c0ff41b 100644 --- a/res.qrc +++ b/res.qrc @@ -7,7 +7,7 @@ audio/notification.pcm - audio/ToxicIncomingCall.pcm + audio/ToxIncomingCall.pcm img/add.svg img/avatar_mask.svg img/contact.svg diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 43c9839c0..1c09d65ec 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -323,7 +323,7 @@ void ChatForm::onAvInvite(uint32_t FriendId, bool video) Widget::getInstance()->newFriendMessageAlert(FriendId, false); Audio& audio = Audio::getInstance(); audio.startLoop(); - audio.playMono16Sound(QStringLiteral(":/audio/ToxicIncomingCall.pcm")); + audio.playMono16Sound(Audio::getSound(Audio::Sound::IncomingCall)); } } diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 6979e38e1..e836bcf73 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -1338,7 +1338,7 @@ bool Widget::newMessageAlert(QWidget* currentWindow, bool isActive, bool sound, bool notifySound = Settings::getInstance().getNotifySound(); if (notifySound && sound && (!isBusy || busySound)) - Audio::getInstance().playMono16Sound(QStringLiteral(":/audio/notification.pcm")); + Audio::getInstance().playMono16Sound(Audio::getSound(Audio::Sound::NewMessage)); } return true;