summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 4694ea92bb..9215160202 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -296,7 +296,6 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
mDevicesListUpdated(false),
mAudioSession(), // TBD - should be NULL
- mAudioSessionChanged(false),
mNextAudioSession(),
mCurrentParcelLocalID(0),
@@ -1641,7 +1640,6 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
LL_INFOS("Voice") << "Adding or joining voice session " << nextSession->mHandle << LL_ENDL;
mAudioSession = nextSession;
- mAudioSessionChanged = true;
if (!mAudioSession || !mAudioSession->mReconnect)
{
mNextAudioSession.reset();
@@ -1898,9 +1896,8 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
sessionStatePtr_t oldSession = mAudioSession;
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); // needs mAudioSession for uri
mAudioSession.reset();
- // We just notified status observers about this change. Don't do it again.
- mAudioSessionChanged = false;
// The old session may now need to be deleted.
reapSession(oldSession);
@@ -1908,9 +1905,9 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
else
{
LL_WARNS("Voice") << "terminateAudioSession(" << wait << ") with NULL mAudioSession" << LL_ENDL;
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);
}
- notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);
// Always reset the terminate request flag when we get here.
// Some slower PCs have a race condition where they can switch to an incoming P2P call faster than the state machine leaves
@@ -3832,7 +3829,6 @@ void LLVivoxVoiceClient::joinedAudioSession(const sessionStatePtr_t &session)
sessionStatePtr_t oldSession = mAudioSession;
mAudioSession = session;
- mAudioSessionChanged = true;
// The old session may now need to be deleted.
reapSession(oldSession);
@@ -6147,7 +6143,6 @@ void LLVivoxVoiceClient::deleteSession(const sessionStatePtr_t &session)
if(mAudioSession == session)
{
mAudioSession.reset();
- mAudioSessionChanged = true;
}
// ditto for the next audio session
@@ -6256,9 +6251,10 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
}
}
+ LLSD channel_info = getAudioSessionChannelInfo();
LL_DEBUGS("Voice")
<< " " << LLVoiceClientStatusObserver::status2string(status)
- << ", session channelInfo " << getAudioSessionChannelInfo()
+ << ", session channelInfo " << channel_info
<< ", proximal is " << inSpatialChannel()
<< LL_ENDL;
@@ -6273,7 +6269,7 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
)
{
LLVoiceClientStatusObserver* observer = *it;
- observer->onChange(status, getAudioSessionChannelInfo(), inSpatialChannel());
+ observer->onChange(status, channel_info, inSpatialChannel());
// In case onError() deleted an entry.
it = mStatusObservers.upper_bound(observer);
}