VOICE-47: Disconnect from voice during teleport to prevent audio artifacts
parent
2fff7fe963
commit
55ff21f58e
|
|
@ -436,24 +436,36 @@ void LLVoiceClient::setNonSpatialChannel(
|
|||
const std::string &uri,
|
||||
const std::string &credentials)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->setNonSpatialChannel(uri, credentials);
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->setNonSpatialChannel(uri, credentials);
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::setSpatialChannel(
|
||||
const std::string &uri,
|
||||
const std::string &credentials)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->setSpatialChannel(uri, credentials);
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->setSpatialChannel(uri, credentials);
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::leaveNonSpatialChannel()
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->leaveNonSpatialChannel();
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->leaveNonSpatialChannel();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::leaveChannel(void)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->leaveChannel();
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->leaveChannel();
|
||||
}
|
||||
}
|
||||
|
||||
std::string LLVoiceClient::getCurrentChannel()
|
||||
|
|
|
|||
|
|
@ -1753,8 +1753,9 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
|
|||
notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN);
|
||||
|
||||
if (mSessionTerminateRequested)
|
||||
{
|
||||
terminateAudioSession(true);
|
||||
|
||||
}
|
||||
// if a relog has been requested then addAndJoineSession
|
||||
// failed in a spectacular way and we need to back out.
|
||||
// If this is not the case then we were simply trying to
|
||||
|
|
@ -2767,9 +2768,16 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe
|
|||
void LLVivoxVoiceClient::setHidden(bool hidden)
|
||||
{
|
||||
mHidden = hidden;
|
||||
|
||||
sendPositionAndVolumeUpdate();
|
||||
return;
|
||||
|
||||
if (mHidden && inSpatialChannel())
|
||||
{
|
||||
// get out of the channel entirely
|
||||
leaveAudioSession();
|
||||
}
|
||||
else
|
||||
{
|
||||
sendPositionAndVolumeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVivoxVoiceClient::sendPositionAndVolumeUpdate(void)
|
||||
|
|
@ -2985,7 +2993,7 @@ void LLVivoxVoiceClient::sendPositionAndVolumeUpdate(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//sendLocalAudioUpdates(); obsolete, used to send volume setting on position updates
|
||||
std::string update(stream.str());
|
||||
if(!update.empty())
|
||||
|
|
@ -4912,8 +4920,10 @@ bool LLVivoxVoiceClient::inSpatialChannel(void)
|
|||
bool result = false;
|
||||
|
||||
if(mAudioSession)
|
||||
{
|
||||
result = mAudioSession->mIsSpatial;
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue