summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-06-13 14:59:28 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-06-13 14:59:28 -0700
commit5e60392c273f0c9c5efa765a05414c618381780a (patch)
treed1eedbb1dfa86e66532a6d8746b7a81e5a444d3a /indra/newview/llvoicevivox.cpp
parent0f3c3563b0861e8ea82b201aab8343d99f993bbc (diff)
parent100ebbab2437de7f5d124a0d7b8279a7a7b57656 (diff)
Merge branch 'develop' of github.com:secondlife/viewer into roxie/webrtc-voice
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 3554933a52..5f8da2ff83 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -282,6 +282,8 @@ bool LLVivoxVoiceClient::sConnected = false;
LLPumpIO *LLVivoxVoiceClient::sPump = nullptr;
LLVivoxVoiceClient::LLVivoxVoiceClient() :
+ mWriteOffset(0),
+ mHidden(true),
mSessionTerminateRequested(false),
mRelogRequested(false),
mTerminateDaemon(false),
@@ -5023,16 +5025,16 @@ bool LLVivoxVoiceClient::isVoiceWorking() const
// Returns true if the indicated participant in the current audio session is really an SL avatar.
// Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls.
-BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id)
+bool LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id)
{
- BOOL result = TRUE;
+ bool result = true;
sessionStatePtr_t session(findSession(id));
if(session)
{
// this is a p2p session with the indicated caller, or the session with the specified UUID.
if(session->mSynthesizedCallerID)
- result = FALSE;
+ result = false;
}
else
{
@@ -5052,9 +5054,9 @@ BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id)
// Returns true if calling back the session URI after the session has closed is possible.
// Currently this will be false only for PSTN P2P calls.
-BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id)
+bool LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id)
{
- BOOL result = TRUE;
+ bool result = true;
sessionStatePtr_t session(findSession(session_id));
if(session != NULL)
@@ -5067,9 +5069,9 @@ BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id)
// Returns true if the session can accept text IM's.
// Currently this will be false only for PSTN P2P calls.
-BOOL LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id)
+bool LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id)
{
- bool result = TRUE;
+ bool result = true;
sessionStatePtr_t session(findSession(session_id));
if(session != NULL)
@@ -5550,9 +5552,9 @@ std::string LLVivoxVoiceClient::getDisplayName(const LLUUID& id)
-BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
+bool LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
if (mProcessChannels)
{
participantStatePtr_t participant(findParticipantByID(id));
@@ -5560,7 +5562,7 @@ BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
{
if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT)
{
- participant->mIsSpeaking = FALSE;
+ participant->mIsSpeaking = false;
}
result = participant->mIsSpeaking;
}
@@ -5569,12 +5571,12 @@ BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id)
return result;
}
-BOOL LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id)
+bool LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
if (!mProcessChannels)
{
- return FALSE;
+ return false;
}
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
@@ -5599,9 +5601,9 @@ F32 LLVivoxVoiceClient::getCurrentPower(const LLUUID& id)
-BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id)
+bool LLVivoxVoiceClient::getUsingPTT(const LLUUID& id)
{
- BOOL result = FALSE;
+ bool result = false;
participantStatePtr_t participant(findParticipantByID(id));
if(participant)
@@ -6287,7 +6289,7 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
if (voice_status)
{
- LLFirstUse::speak(true);
+ LLAppViewer::instance()->postToMainCoro([=]() { LLFirstUse::speak(true); });
}
}
}
@@ -7208,8 +7210,8 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
}
// Look for input delimiter(s) in the input buffer. If one is found, send the message to the xml parser.
- int start = 0;
- int delim;
+ size_t start = 0;
+ size_t delim;
while((delim = mInput.find("\n\n\n", start)) != std::string::npos)
{
@@ -7220,7 +7222,8 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
XML_SetElementHandler(parser, ExpatStartTag, ExpatEndTag);
XML_SetCharacterDataHandler(parser, ExpatCharHandler);
XML_SetUserData(parser, this);
- XML_Parse(parser, mInput.data() + start, delim - start, false);
+ XML_Parse(parser, mInput.data() + start, static_cast<int>(delim - start), false);
+
LL_DEBUGS("VivoxProtocolParser") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL;
start = delim + 3;