diff options
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 88 |
1 files changed, 39 insertions, 49 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index f727a54cd7..d64c25d312 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -2034,23 +2034,48 @@ bool LLVivoxVoiceClient::waitForChannel() llcoro::suspend(); break; } - sessionStatePtr_t joinSession = mNextAudioSession; - mNextAudioSession.reset(); - mIsProcessingChannels = true; - if (!runSession(joinSession)) //suspends + + try { - mIsProcessingChannels = false; - LL_DEBUGS("Voice") << "runSession returned false; leaving inner loop" << LL_ENDL; - break; + sessionStatePtr_t joinSession = mNextAudioSession; + mNextAudioSession.reset(); + mIsProcessingChannels = true; + if (!runSession(joinSession)) //suspends + { + mIsProcessingChannels = false; + LL_DEBUGS("Voice") << "runSession returned false; leaving inner loop" << LL_ENDL; + break; + } + else + { + mIsProcessingChannels = false; + LL_DEBUGS("Voice") + << "runSession returned true to inner loop" + << " RelogRequested=" << mRelogRequested + << " VoiceEnabled=" << mVoiceEnabled + << LL_ENDL; + } } - else + catch (const LLCoros::Stop&) + { + LL_DEBUGS("LLVivoxVoiceClient") << "Received a shutdown exception" << LL_ENDL; + } + catch (const LLContinueError&) { - mIsProcessingChannels = false; - LL_DEBUGS("Voice") - << "runSession returned true to inner loop" - << " RelogRequested=" << mRelogRequested - << " VoiceEnabled=" << mVoiceEnabled + LOG_UNHANDLED_EXCEPTION("LLVivoxVoiceClient"); + } + catch (...) + { + // Ideally for Windows need to log SEH exception instead or to set SEH + // handlers but bugsplat shows local variables for windows, which should + // be enough + LL_WARNS("Voice") << "voiceControlStateMachine crashed in state VOICE_CHANNEL_STATE_PROCESS_CHANNEL" + << " mRelogRequested " << mRelogRequested + << " mVoiceEnabled " << mVoiceEnabled + << " mIsProcessingChannels " << mIsProcessingChannels + << " mProcessChannels " << mProcessChannels << LL_ENDL; + throw; } } @@ -5021,8 +5046,7 @@ bool LLVivoxVoiceClient::isVoiceWorking() const //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) // Condition with joining spatial num was added to take into account possible problems with connection to voice // server(EXT-4313). See bug descriptions and comments for MAX_NORMAL_JOINING_SPATIAL_NUM for more info. - return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && mIsProcessingChannels; -// return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); + return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && mIsLoggedIn; } // Returns true if the indicated participant in the current audio session is really an SL avatar. @@ -6469,7 +6493,6 @@ LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) : mIsNew(false) { mExpiryTimer.stop(); - mExpiryWarningTimer.stop(); } LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry() @@ -6580,20 +6603,6 @@ void LLVivoxVoiceClient::addVoiceFont(const S32 font_index, font->mExpiryTimer.start(); font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL); - // Set the warning timer to some interval before actual expiry. - S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); - if (warning_time != 0) - { - font->mExpiryWarningTimer.start(); - F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time); - font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL); - } - else - { - // Disable the warning timer. - font->mExpiryWarningTimer.stop(); - } - // Only flag new session fonts after the first time we have fetched the list. if (mVoiceFontsReceived) { @@ -6635,7 +6644,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() // than checking each font individually. bool have_expired = false; - bool will_expire = false; bool expired_in_use = false; LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault(); @@ -6645,7 +6653,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() { voiceFontEntry* voice_font = iter->second; LLFrameTimer& expiry_timer = voice_font->mExpiryTimer; - LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer; // Check for expired voice fonts if (expiry_timer.getStarted() && expiry_timer.hasExpired()) @@ -6662,14 +6669,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() deleteVoiceFont(voice_font->mID); have_expired = true; } - - // Check for voice fonts that will expire in less that the warning time - if (warning_timer.getStarted() && warning_timer.hasExpired()) - { - LL_DEBUGS("VoiceFont") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL; - will_expire = true; - warning_timer.stop(); - } } LLSD args; @@ -6691,15 +6690,6 @@ void LLVivoxVoiceClient::expireVoiceFonts() // Refresh voice font lists in the UI. notifyVoiceFontObservers(); } - - // Give a warning notification if any voice fonts are due to expire. - if (will_expire) - { - S32Seconds seconds(gSavedSettings.getS32("VoiceEffectExpiryWarningTime")); - args["INTERVAL"] = llformat("%d", LLUnit<S32, LLUnits::Days>(seconds).value()); - - LLNotificationsUtil::add("VoiceEffectsWillExpire", args); - } } void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id) |