diff options
author | Oz Linden <oz@lindenlab.com> | 2018-04-13 20:34:10 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2018-04-13 20:34:10 -0400 |
commit | 73b44833a6a801a7bc72810664557e559d54575d (patch) | |
tree | e8a1582e1c65fd1cad68367474ceace422b002ab /indra/newview/llvoicevivox.cpp | |
parent | d71da863c9341aeaa64ec64119601d158affe747 (diff) |
VOICE-59: display human-friendly names for voice input and output devices
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 8e46e08b14..90e106b000 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -48,6 +48,7 @@ #include "llviewercontrol.h" #include "llappviewer.h" // for gDisconnected, gDisableVoice #include "llprocess.h" +#include "llsdserialize.h" // Viewer includes #include "llmutelist.h" // to check for muted avatars @@ -1964,6 +1965,7 @@ bool LLVivoxVoiceClient::performMicTuning() if (mTuningSpeakerVolumeDirty) { + LL_INFOS("Voice") << "setting tuning speaker level to " << mTuningSpeakerVolume << LL_ENDL; stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetSpeakerLevel.1\">" << "<Level>" << mTuningSpeakerVolume << "</Level>" @@ -2321,11 +2323,15 @@ void LLVivoxVoiceClient::clearCaptureDevices() mCaptureDevices.clear(); } -void LLVivoxVoiceClient::addCaptureDevice(const std::string& name) +void LLVivoxVoiceClient::addCaptureDevice(const std::string& display_name, const std::string& device_name) { - LL_DEBUGS("Voice") << name << LL_ENDL; - - mCaptureDevices.push_back(name); + LL_DEBUGS("Voice") << "display: '" << display_name << "' device: '" << device_name << "'" << LL_ENDL; + LLSD device(LLSD::emptyMap()); + device["display"]=display_name; + device["device"]=device_name; + std::ostringstream device_names; + LLSDSerialize::toNotation(device, device_names); + mCaptureDevices.push_back(device_names.str()); } LLVoiceDeviceList& LLVivoxVoiceClient::getCaptureDevices() @@ -2363,10 +2369,15 @@ void LLVivoxVoiceClient::clearRenderDevices() mRenderDevices.clear(); } -void LLVivoxVoiceClient::addRenderDevice(const std::string& name) +void LLVivoxVoiceClient::addRenderDevice(const std::string& display_name, const std::string& device_name) { - LL_DEBUGS("Voice") << name << LL_ENDL; - mRenderDevices.push_back(name); + LL_DEBUGS("Voice") << "display: '" << display_name << "' device: '" << device_name << "'" << LL_ENDL; + LLSD device(LLSD::emptyMap()); + device["display"]=display_name; + device["device"]=device_name; + std::ostringstream device_names; + LLSDSerialize::toNotation(device, device_names); + mRenderDevices.push_back(device_names.str()); } LLVoiceDeviceList& LLVivoxVoiceClient::getRenderDevices() @@ -4022,7 +4033,7 @@ void LLVivoxVoiceClient::sessionNotificationEvent(std::string &sessionHandle, st void LLVivoxVoiceClient::auxAudioPropertiesEvent(F32 energy) { - LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL; + LL_DEBUGS("VoiceEnergy") << "got energy " << energy << LL_ENDL; mTuningEnergy = energy; } @@ -7006,16 +7017,20 @@ void LLVivoxProtocolParser::EndTag(const char *tag) else if (!stricmp("Presence", tag)) statusString = string; else if (!stricmp("CaptureDevices", tag)) + { LLVivoxVoiceClient::getInstance()->setDevicesListUpdated(true); + } else if (!stricmp("RenderDevices", tag)) + { LLVivoxVoiceClient::getInstance()->setDevicesListUpdated(true); + } else if (!stricmp("CaptureDevice", tag)) { - LLVivoxVoiceClient::getInstance()->addCaptureDevice(deviceString); + LLVivoxVoiceClient::getInstance()->addCaptureDevice(displayNameString, deviceString); } else if (!stricmp("RenderDevice", tag)) { - LLVivoxVoiceClient::getInstance()->addRenderDevice(deviceString); + LLVivoxVoiceClient::getInstance()->addRenderDevice(displayNameString, deviceString); } else if (!stricmp("BlockMask", tag)) blockMask = string; |