From 9094d0281d362bd2caab5a34f42222aa1e24d9c2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Aug 2024 09:54:31 +0300 Subject: Adjust some LLVoiceClient functions Feels like I should have made isParticipant and getParticipantList static to minimize singleton dependency/calls --- indra/newview/llvoiceclient.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvoiceclient.cpp') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 0cf4a64c3d..495d521894 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -408,13 +408,13 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() //-------------------------------------------------- // participants -void LLVoiceClient::getParticipantList(std::set &participants) +void LLVoiceClient::getParticipantList(std::set &participants) const { LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); LLVivoxVoiceClient::getInstance()->getParticipantList(participants); } -bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) +bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const { return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || LLVivoxVoiceClient::getInstance()->isParticipant(speaker_id); @@ -718,12 +718,12 @@ void LLVoiceClient::toggleUserPTTState(void) //------------------------------------------- // nearby speaker accessors -BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) +bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const { - return isParticipant(id) ? TRUE : FALSE; + return isParticipant(id); } -std::string LLVoiceClient::getDisplayName(const LLUUID& id) +std::string LLVoiceClient::getDisplayName(const LLUUID& id) const { std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); if (result.empty()) -- cgit v1.2.3 From 227b212dc67998098d09b7f15e852ed6cd7ac83a Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 9 Aug 2024 11:59:31 -0700 Subject: Teleport to a region with a different voice server type causes failure in voice When teleporting, the viewer 'hides' voice, effectively disabling it, until the teleport has completed. It does this by instructing the voice module to hide and then unhide. The problem was, it would instruct one voice module for one voice server type to hide, and then after teleport, it would instruct the other voice module for the other voice server type to unhide, resulting in one voice module being hidden. When the user transitions back to a region with the initial voice module, it's hidden, hence voice doesn't work. The solution is to hide/unhide both voice modules. --- indra/newview/llvoiceclient.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoiceclient.cpp') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 495d521894..5132b9bb07 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -281,10 +281,8 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ void LLVoiceClient::setHidden(bool hidden) { - if (mSpatialVoiceModule) - { - mSpatialVoiceModule->setHidden(hidden); - } + LLWebRTCVoiceClient::getInstance()->setHidden(hidden); + LLVivoxVoiceClient::getInstance()->setHidden(hidden); } void LLVoiceClient::terminate() -- cgit v1.2.3