From 7a0fb4fece5a92627caa08622e9584a903a3fa1d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 7 Mar 2016 12:54:49 -0800 Subject: MAINT-6172: Send the render and mic devices to a session when they are dirty, not just in Tuning mode. --- indra/newview/llvoicevivox.cpp | 19 +++++++++++++++++++ indra/newview/llvoicevivox.h | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c8bfc63a6a..660ca9e5b7 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1470,6 +1470,7 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session) while (mVoiceEnabled && !mSessionTerminateRequested && !mTuningMode) { + sendCaptureAndRenderDevices(); if (mAudioSession && mAudioSession->mParticipantsChanged) { mAudioSession->mParticipantsChanged = false; @@ -1557,6 +1558,24 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session) return true; } +void LLVivoxVoiceClient::sendCaptureAndRenderDevices() +{ + if (mCaptureDeviceDirty || mRenderDeviceDirty) + { + std::ostringstream stream; + + buildSetCaptureDevice(stream); + buildSetRenderDevice(stream); + + if (!stream.str().empty()) + { + writeString(stream.str()); + } + + llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); + } +} + void LLVivoxVoiceClient::recordingAndPlaybackMode() { LL_INFOS("Voice") << "In voice capture/playback mode." << LL_ENDL; diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 176f7f56dc..c75e1bf39b 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -749,7 +749,8 @@ private: void setHidden(bool hidden); //virtual void sendPositionAndVolumeUpdate(void); - void buildSetCaptureDevice(std::ostringstream &stream); + void sendCaptureAndRenderDevices(); + void buildSetCaptureDevice(std::ostringstream &stream); void buildSetRenderDevice(std::ostringstream &stream); -- cgit v1.2.3