diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-02-09 13:13:44 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-22 23:11:37 -0800 |
commit | 707d76880a2a1dedd0b9045e1954eff8fbf26d3e (patch) | |
tree | 198a8b5ae1ec1b968cf468c167468c4f08183a34 /indra | |
parent | 1fc6ea0f25f52da56316d038e39c5add5e58747e (diff) |
Fix ad-hoc voice
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimview.cpp | 29 | ||||
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 4 |
2 files changed, 19 insertions, 14 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index de1422829b..9b2cd46a4b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -697,12 +697,19 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& // set P2P type by default mSessionType = P2P_SESSION; - if ((IM_NOTHING_SPECIAL == mType || IM_SESSION_P2P_INVITE == mType) && LLVoiceClient::getInstance()->hasP2PInterface()) - { - // only use LLVoiceChannelP2P if the provider can handle the special P2P interface, - // which uses the voice server to relay calls and invites. Otherwise, - // we use the group voice provider. - mVoiceChannel = new LLVoiceChannelP2P(session_id, name, other_participant_id); + if (IM_NOTHING_SPECIAL == mType || IM_SESSION_P2P_INVITE == mType) + { + if (LLVoiceClient::getInstance()->hasP2PInterface()) + { + // only use LLVoiceChannelP2P if the provider can handle the special P2P interface, + // which uses the voice server to relay calls and invites. Otherwise, + // we use the group voice provider. + mVoiceChannel = new LLVoiceChannelP2P(session_id, name, other_participant_id); + } + else + { + mVoiceChannel = new LLVoiceChannelGroup(session_id, name, true); + } } else { @@ -710,17 +717,13 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& if (gAgent.isInGroup(mSessionID)) { mSessionType = GROUP_SESSION; + mVoiceChannel = new LLVoiceChannelGroup(session_id, name, false); } - else if (LLVoiceClient::getInstance()->hasP2PInterface()) + else { mSessionType = ADHOC_SESSION; + mVoiceChannel = new LLVoiceChannelGroup(session_id, name, true); } - else - { - // webrtc uses adhoc channels for p2p - mSessionType = P2P_SESSION; - } - mVoiceChannel = new LLVoiceChannelGroup(session_id, name, mSessionType == P2P_SESSION); } if(mVoiceChannel) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index df3ca08955..d3b9f8ba2c 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -531,7 +531,9 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates() // add new connections for new neighbors for (auto &neighbor : neighbor_ids) { - connectionPtr_t connection = mWebRTCConnections.emplace_back(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID)); + connectionPtr_t connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID)); + + mWebRTCConnections.push_back(connection); connection->setMicGain(mMicGain); connection->setMuteMic(mMuted); connection->setSpeakerVolume(mSpeakerVolume); |