diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-19 19:59:03 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-19 19:59:03 +0800 |
commit | 495f103000137b3288eaa05a4298fd33ceb3c2dc (patch) | |
tree | 19b79a5cb33275a874d24e923a04de7b9657401b /indra/newview/llvoiceclient.cpp | |
parent | b7a79709003b1f7f0451ba577576040fc03e50f9 (diff) | |
parent | 0f3ffb0fad721740f20ed5c7a74f4ceade6d46b6 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 3a07e4bb90..e8d64cabf6 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -289,10 +289,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() @@ -462,7 +460,7 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() //-------------------------------------------------- // participants -void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) +void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) const { #if !__FreeBSD__ LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); @@ -470,7 +468,7 @@ void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) LLVivoxVoiceClient::getInstance()->getParticipantList(participants); } -bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) +bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const { return #if !__FreeBSD__ @@ -791,12 +789,12 @@ void LLVoiceClient::toggleUserPTTState(void) //------------------------------------------- // nearby speaker accessors -bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) +bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const { return isParticipant(id); } -std::string LLVoiceClient::getDisplayName(const LLUUID& id) +std::string LLVoiceClient::getDisplayName(const LLUUID& id) const { #if __FreeBSD__ return LLVivoxVoiceClient::getInstance()->getDisplayName(id); @@ -897,9 +895,15 @@ void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { - LLVivoxVoiceClient::getInstance()->removeObserver(observer); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->removeObserver(observer); + } #if !__FreeBSD__ - LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + } #endif } @@ -913,9 +917,15 @@ void LLVoiceClient::addObserver(LLFriendObserver* observer) void LLVoiceClient::removeObserver(LLFriendObserver* observer) { - LLVivoxVoiceClient::getInstance()->removeObserver(observer); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->removeObserver(observer); + } #if !__FreeBSD__ - LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + } #endif } @@ -929,9 +939,15 @@ void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { - LLVivoxVoiceClient::getInstance()->removeObserver(observer); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->removeObserver(observer); + } #if !__FreeBSD__ - LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + } #endif } |