From a929d4c862a60c9abc1b6e9fe507831326f232dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 10 Sep 2022 07:11:37 -0700 Subject: =?UTF-8?q?fixes=20#3192=20(VoiceService:=20=D0=B7=D0=B2=D1=83?= =?UTF-8?q?=D0=BA=20=D0=B7=D0=B2=D0=BE=D0=BD=D0=BA=D0=B0=20=D0=B2=D0=BE?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=BE=D0=B8=D0=B7=D0=B2=D0=BE=D0=B4=D0=B8?= =?UTF-8?q?=D1=82=D1=81=D1=8F=20=D0=BB=D0=B8=D1=88=D1=8C=20=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD=20=D1=80=D0=B0=D0=B7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/VoiceService/src/VoiceCall.cpp | 13 ++++++++++--- plugins/VoiceService/src/stdafx.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'plugins/VoiceService/src') diff --git a/plugins/VoiceService/src/VoiceCall.cpp b/plugins/VoiceService/src/VoiceCall.cpp index 40ea12aedf..8198ee8c61 100644 --- a/plugins/VoiceService/src/VoiceCall.cpp +++ b/plugins/VoiceService/src/VoiceCall.cpp @@ -196,6 +196,11 @@ void VoiceCall::RemoveNotifications() g_clistApi.pfnRemoveEvent(hContact, MEVENT(1001)); clistBlinking = false; } + + if (soundActive) { + Skin_PlaySoundFile(nullptr); + soundActive = false; + } } void VoiceCall::SetState(int aState) @@ -259,10 +264,12 @@ void VoiceCall::SetStatus(const wchar_t *text) void VoiceCall::Notify(bool popup, bool sound, bool clist) { - if (sound) - Skin_PlaySound(g_sounds[state].szName); + if (sound) { + soundActive = true; + Skin_PlaySound(g_sounds[state].szName, SPS_LOOP); + } - if(IsWindowVisible(GetHwnd())) + if (IsWindowVisible(GetHwnd())) return; if (popup) diff --git a/plugins/VoiceService/src/stdafx.h b/plugins/VoiceService/src/stdafx.h index 4233afc08c..1c99427162 100644 --- a/plugins/VoiceService/src/stdafx.h +++ b/plugins/VoiceService/src/stdafx.h @@ -125,7 +125,7 @@ public: wchar_t number[256]; wchar_t displayName[256]; int state = -1; - bool incoming = false, secure = false, clistBlinking = false; + bool incoming = false, secure = false, clistBlinking = false, soundActive = false; VoiceCall(VoiceProvider *module, const char *id); ~VoiceCall(); -- cgit v1.2.3