summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-03-07 12:54:49 -0800
committerRider Linden <rider@lindenlab.com>2016-03-07 12:54:49 -0800
commit7a0fb4fece5a92627caa08622e9584a903a3fa1d (patch)
treea02db13477404ce3f50a2bec245da139ad963c2f
parentd51a5a615ab4c1c52b4e8c2eaa1f88bf785f3f66 (diff)
MAINT-6172: Send the render and mic devices to a session when they are dirty, not just in Tuning mode.
-rwxr-xr-xindra/newview/llvoicevivox.cpp19
-rwxr-xr-xindra/newview/llvoicevivox.h3
2 files changed, 21 insertions, 1 deletions
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);