Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion indra/newview/llvoicewebrtc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* License as published by the Free Software Foundation
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* This library is distributed in the hope that it will be useful,VOICE_STATE
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
Expand Down Expand Up @@ -2054,6 +2054,26 @@ void LLWebRTCVoiceClient::sessionState::revive()
mShuttingDown = false;
}

void LLWebRTCVoiceClient::parcelSessionState::revive()
{
sessionState::revive();
LLUUID region_id = gAgent.getRegion()->getRegionID();
connectionPtr_t connection = std::make_shared<LLVoiceWebRTCSpatialConnection>(region_id, mParcelLocalID, mChannelID);
mWebRTCConnections.push_back(connection);
connection->setMuteMic(mMuted);
connection->setSpeakerVolume(mSpeakerVolume);
}

void LLWebRTCVoiceClient::adhocSessionState::revive()
{
sessionState::revive();
LLUUID region_id = gAgent.getRegion()->getRegionID();
connectionPtr_t connection = std::make_shared<LLVoiceWebRTCAdHocConnection>(region_id, mChannelID, mCredentials);
mWebRTCConnections.push_back(connection);
connection->setMuteMic(mMuted);
connection->setSpeakerVolume(mSpeakerVolume);
}

//=========================================================================
// the following are methods to support the coroutine implementation of the
// voice connection and processing. They should only be called in the context
Expand Down Expand Up @@ -2202,6 +2222,7 @@ LLWebRTCVoiceClient::estateSessionState::estateSessionState()
}

LLWebRTCVoiceClient::parcelSessionState::parcelSessionState(const std::string &channelID, S32 parcel_local_id)
: mParcelLocalID(parcel_local_id)
{
mHangupOnLastLeave = false;
mNotifyOnFirstJoin = false;
Expand Down
9 changes: 8 additions & 1 deletion indra/newview/llvoicewebrtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class LLWebRTCVoiceClient : public LLSingleton<LLWebRTCVoiceClient>,
static ptr_t matchSessionByChannelID(const std::string& channel_id);

void shutdownAllConnections();
void revive();
virtual void revive();

static void processSessionStates();

Expand Down Expand Up @@ -361,9 +361,14 @@ class LLWebRTCVoiceClient : public LLSingleton<LLWebRTCVoiceClient>,
public:
parcelSessionState(const std::string& channelID, S32 parcel_local_id);

void revive() override;

bool isSpatial() override { return true; }
bool isEstate() override { return false; }
bool isCallbackPossible() override { return false; }

private:
S32 mParcelLocalID;
};

class adhocSessionState : public sessionState
Expand All @@ -374,6 +379,8 @@ class LLWebRTCVoiceClient : public LLSingleton<LLWebRTCVoiceClient>,
bool notify_on_first_join,
bool hangup_on_last_leave);

void revive() override;

bool isSpatial() override { return false; }
bool isEstate() override { return false; }

Expand Down