summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-14 20:52:00 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-14 20:52:00 +0800
commitce8cb73ac37ce59a76c3ebfa684e8f1c94e8fd13 (patch)
tree39237632c23f093b2ea9b0490b0a19cb2dee99e9 /indra/newview/llvoiceclient.cpp
parentf58cc7facb14ff6b6763652b433524e85a728cc3 (diff)
parentab86e77818e76bdf3ef660b9fa964217265be3e7 (diff)
Merge remote-tracking branch 'secondlife/release/webrtc-voice' into webrtc-voice
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp36
1 files changed, 26 insertions, 10 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index e36b086f00..6ff7426317 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()
@@ -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
}