[Voice Update] LLVoiceClient

Migrate a bunch of classes out of llvoiceclient.* and into new llvoicevivox.*
Update most of these to match their counterparts
Introduce VoiceFonts support (voice morphing, floater still to come)
Support for a bunch of v3 voice settings.
Move volume settings management from LLMutelist into LLSpeakerVolumeStorage
Support for Avaline mutes (WIP)
Adds voice section to LLAgent
Moved llfloatervoicedevicesettings to llpanelvoicedevicesettings, v3's voice device panel design is more intuitive.
This commit is contained in:
Lirusaito
2013-06-03 22:20:27 -04:00
parent 07e1b5c3b9
commit c273e34ed8
51 changed files with 10871 additions and 8121 deletions

View File

@@ -954,9 +954,9 @@ P(viewerChatterBoxInvitationAcceptResponder);
P(viewerMediaOpenIDResponder);
P(viewerMediaWebProfileResponder);
P(viewerStatsResponder);
P(viewerVoiceAccountProvisionResponder);
P(vivoxVoiceAccountProvisionResponder);
P(vivoxVoiceClientCapResponder);
P(voiceCallCapResponder);
P(voiceClientCapResponder);
P(webProfileResponders);
P(wholeModelFeeResponder);
P(wholeModelUploadResponder);

View File

@@ -260,7 +260,6 @@ set(viewer_SOURCE_FILES
llfloatertos.cpp
llfloaterurldisplay.cpp
llfloaterurlentry.cpp
llfloatervoicedevicesettings.cpp
llfloaterwater.cpp
llfloaterwindlight.cpp
llfloaterworldmap.cpp
@@ -378,6 +377,7 @@ set(viewer_SOURCE_FILES
llpanelplace.cpp
llpanelprofile.cpp
llpanelskins.cpp
llpanelvoicedevicesettings.cpp
llpanelvolume.cpp
llpanelweb.cpp
llparcelselection.cpp
@@ -523,6 +523,7 @@ set(viewer_SOURCE_FILES
llvoiceclient.cpp
llvoiceremotectrl.cpp
llvoicevisualizer.cpp
llvoicevivox.cpp
llvoinventorylistener.cpp
llvopartgroup.cpp
llvosky.cpp
@@ -761,7 +762,6 @@ set(viewer_HEADER_FILES
llfloatertos.h
llfloaterurldisplay.h
llfloaterurlentry.h
llfloatervoicedevicesettings.h
llfloaterwater.h
llfloaterwindlight.h
llfloaterworldmap.h
@@ -879,6 +879,7 @@ set(viewer_HEADER_FILES
llpanelplace.h
llpanelprofile.h
llpanelskins.h
llpanelvoicedevicesettings.h
llpanelvolume.h
llpanelweb.h
llparcelselection.h
@@ -1029,6 +1030,7 @@ set(viewer_HEADER_FILES
llvoiceclient.h
llvoiceremotectrl.h
llvoicevisualizer.h
llvoicevivox.h
llvoinventorylistener.h
llvopartgroup.h
llvosky.h

View File

@@ -15628,6 +15628,50 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceCallsRejectGroup</key>
<map>
<key>Comment</key>
<string>Silently reject all incoming group voice calls.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceDisableMic</key>
<map>
<key>Comment</key>
<string>Completely disable the ability to open the mic.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceEffectExpiryWarningTime</key>
<map>
<key>Comment</key>
<string>How much notice to give of Voice Morph subscriptions expiry, in seconds.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>259200</integer>
</map>
<key>VoiceMorphingEnabled</key>
<map>
<key>Comment</key>
<string>Whether or not to enable Voice Morphs and show the UI.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AutoDisengageMic</key>
<map>
<key>Comment</key>
@@ -15639,6 +15683,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowDeviceSettings</key>
<map>
<key>Comment</key>
<string>Show device settings</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceEarLocation</key>
<map>
<key>Comment</key>
@@ -15749,6 +15804,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<string>Default</string>
</map>
<key>VoiceLogFile</key>
<map>
<key>Comment</key>
<string>Log file to use when launching the voice daemon</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>VoiceOutputAudioDevice</key>
<map>
<key>Comment</key>
@@ -15782,6 +15848,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceServerType</key>
<map>
<key>Comment</key>
<string>The type of voice server to connect to.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>vivox</string>
</map>
<key>WLSkyDetail</key>
<map>
<key>Comment</key>

View File

@@ -573,6 +573,17 @@
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>VoiceEffectDefault</key>
<map>
<key>Comment</key>
<string>Selected Voice Morph</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>00000000-0000-0000-0000-000000000000</string>
</map>
<key>LogFileNamewithDate</key>
<map>

View File

@@ -260,6 +260,56 @@ void LLAgent::parcelChangedCallback()
gAgent.mCanEditParcel = can_edit;
}
// static
bool LLAgent::isActionAllowed(const LLSD& sdname)
{
bool retval = false;
const std::string& param = sdname.asString();
if (param == "speak")
{
if ( gAgent.isVoiceConnected() &&
LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
! LLVoiceClient::getInstance()->inTuningMode() )
{
retval = true;
}
else
{
retval = false;
}
}
return retval;
}
// static
void LLAgent::pressMicrophone(const LLSD& name)
{
//LLFirstUse::speak(false);
LLVoiceClient::getInstance()->inputUserControlState(true);
}
// static
void LLAgent::releaseMicrophone(const LLSD& name)
{
LLVoiceClient::getInstance()->inputUserControlState(false);
}
// static
void LLAgent::toggleMicrophone(const LLSD& name)
{
LLVoiceClient::getInstance()->toggleUserPTTState();
}
// static
bool LLAgent::isMicrophoneOn(const LLSD& sdname)
{
return LLVoiceClient::getInstance()->getUserPTTState();
}
// ************************************************************
// Enabled this definition to compile a 'hacked' viewer that
// locally believes the end user has godlike powers.

View File

@@ -313,6 +313,22 @@ public:
static bool enableFlying();
BOOL canFly(); // Does this parcel allow you to fly?
//--------------------------------------------------------------------
// Voice
//--------------------------------------------------------------------
public:
bool isVoiceConnected() const { return mVoiceConnected; }
void setVoiceConnected(const bool b) { mVoiceConnected = b; }
static void pressMicrophone(const LLSD& name);
static void releaseMicrophone(const LLSD& name);
static void toggleMicrophone(const LLSD& name);
static bool isMicrophoneOn(const LLSD& sdname);
static bool isActionAllowed(const LLSD& sdname);
private:
bool mVoiceConnected;
//--------------------------------------------------------------------
// Chat
//--------------------------------------------------------------------

View File

@@ -1095,7 +1095,7 @@ bool LLAppViewer::mainLoop()
// Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated.
LLVoiceChannel::initClass();
LLVoiceClient::init(gServicePump);
LLVoiceClient::getInstance()->init(gServicePump);
LLTimer frameTimer,idleTimer,periodicRenderingTimer;
LLTimer debugTime;
@@ -1452,7 +1452,7 @@ bool LLAppViewer::cleanup()
// to ensure shutdown order
LLMortician::setZealous(TRUE);
LLVoiceClient::terminate();
LLVoiceClient::getInstance()->terminate();
disconnectViewer();

View File

@@ -299,7 +299,7 @@ bool LLAvatarActions::isCalling(const LLUUID &id)
//static
bool LLAvatarActions::canCall()
{
return LLVoiceClient::getInstance()->voiceEnabled() /*&& LLVoiceClient::getInstance()->isVoiceWorking()*/;
return LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
}
// static

View File

@@ -3,10 +3,9 @@
* @brief Management interface for muting and controlling volume of residents currently speaking
*
* $LicenseInfo:firstyear=2005&license=viewergpl$
*
* Second Life Viewer Source Code
* Copyright (c) 2005-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
@@ -94,7 +93,6 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy
mDisplayName = name;
mLegacyName = name;
}
LLVoiceClient::getInstance()->setUserVolume(id, LLMuteList::getInstance()->getSavedResidentVolume(id));
mActivityTimer.reset(SPEAKER_TIMEOUT);
}
@@ -224,7 +222,7 @@ BOOL LLFloaterActiveSpeakers::postBuild()
return TRUE;
}
void LLFloaterActiveSpeakers::onChange()
void LLFloaterActiveSpeakers::onParticipantsChanged()
{
//refresh();
}
@@ -598,7 +596,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
if (mMuteVoiceCtrl)
{
mMuteVoiceCtrl->setValue(LLMuteList::getInstance()->isMuted(selected_id, LLMute::flagVoiceChat));
mMuteVoiceCtrl->setEnabled(LLVoiceClient::voiceEnabled()
mMuteVoiceCtrl->setEnabled(LLVoiceClient::getInstance()->voiceEnabled()
&& LLVoiceClient::getInstance()->getVoiceEnabled(selected_id)
&& selected_id.notNull()
&& selected_id != gAgent.getID()
@@ -618,7 +616,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
&& !LLMuteList::getInstance()->isLinden(selected_speakerp->mLegacyName));
}
mVolumeSlider->setValue(LLVoiceClient::getInstance()->getUserVolume(selected_id));
mVolumeSlider->setEnabled(LLVoiceClient::voiceEnabled()
mVolumeSlider->setEnabled(LLVoiceClient::getInstance()->voiceEnabled()
&& LLVoiceClient::getInstance()->getVoiceEnabled(selected_id)
&& selected_id.notNull()
&& selected_id != gAgent.getID()
@@ -752,9 +750,6 @@ void LLPanelActiveSpeakers::onVolumeChange(LLUICtrl* source, void* user_data)
F32 new_volume = (F32)panelp->childGetValue("speaker_volume").asReal();
LLVoiceClient::getInstance()->setUserVolume(speaker_id, new_volume);
// store this volume setting for future sessions
LLMuteList::getInstance()->setSavedResidentVolume(speaker_id, new_volume);
}
//static
@@ -1145,17 +1140,19 @@ void LLSpeakerMgr::updateSpeakerList()
// are we bound to the currently active voice channel?
if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()))
{
LLVoiceClient::participantMap* participants = LLVoiceClient::getInstance()->getParticipantList();
if(participants)
std::set<LLUUID> participants;
LLVoiceClient::getInstance()->getParticipantList(participants);
// add new participants to our list of known speakers
for (std::set<LLUUID>::iterator participant_it = participants.begin();
participant_it != participants.end();
++participant_it)
{
LLVoiceClient::participantMap::iterator participant_it;
setSpeaker(*participant_it,
LLVoiceClient::getInstance()->getDisplayName(*participant_it),
LLSpeaker::STATUS_VOICE_ACTIVE,
(LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL));
// add new participants to our list of known speakers
for (participant_it = participants->begin(); participant_it != participants->end(); ++participant_it)
{
LLVoiceClient::participantState* participantp = participant_it->second;
setSpeaker(participantp->mAvatarID, participantp->mDisplayName, LLSpeaker::STATUS_VOICE_ACTIVE, (participantp->isAvatar()?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL));
}
}
}
}
@@ -1216,7 +1213,7 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id)
BOOL LLSpeakerMgr::isVoiceActive()
{
// mVoiceChannel = NULL means current voice channel, whatever it is
return LLVoiceClient::voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive();
return LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive();
}

View File

@@ -3,10 +3,9 @@
* @brief Management interface for muting and controlling volume of residents currently speaking
*
* $LicenseInfo:firstyear=2005&license=viewergpl$
*
* Second Life Viewer Source Code
* Copyright (c) 2005-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
@@ -199,7 +198,7 @@ public:
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void draw();
/*virtual*/ void onChange();
/*virtual*/ void onParticipantsChanged();
static void* createSpeakersPanel(void* data);

View File

@@ -315,7 +315,7 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
//static
LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
{
if (!LLVoiceClient::voiceEnabled())
if (!LLVoiceClient::getInstance()->voiceEnabled())
{
return NULL;
}

View File

@@ -1,348 +0,0 @@
/**
* @file llfloatervoicedevicesettings.cpp
* @author Richard Nelson
* @brief Voice communication set-up
*
* $LicenseInfo:firstyear=2007&license=viewergpl$
*
* Copyright (c) 2007-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llfloatervoicedevicesettings.h"
// Viewer includes
#include "llagent.h"
#include "llbutton.h"
#include "llcombobox.h"
#include "llfocusmgr.h"
#include "lliconctrl.h"
#include "llprefsvoice.h"
#include "llsliderctrl.h"
#include "llviewercontrol.h"
#include "llvoicechannel.h"
#include "llvoiceclient.h"
// Library includes (after viewer)
#include "lluictrlfactory.h"
LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
{
mCtrlInputDevices = NULL;
mCtrlOutputDevices = NULL;
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
mDevicesUpdated = FALSE;
// grab "live" mic volume level
mMicVolume = gSavedSettings.getF32("AudioLevelMic");
// ask for new device enumeration
// now do this in onOpen() instead...
//LLVoiceClient::getInstance()->refreshDeviceLists();
}
LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings()
{
}
BOOL LLPanelVoiceDeviceSettings::postBuild()
{
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
// set mic volume tuning slider based on last mic volume setting
volume_slider->setValue(mMicVolume);
childSetCommitCallback("voice_input_device", onCommitInputDevice, this);
childSetCommitCallback("voice_output_device", onCommitOutputDevice, this);
return TRUE;
}
void LLPanelVoiceDeviceSettings::draw()
{
// let user know that volume indicator is not yet available
bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode();
childSetVisible("wait_text", !is_in_tuning_mode);
LLPanel::draw();
F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy();
S32 discrete_power = 0;
if (!is_in_tuning_mode)
{
discrete_power = 0;
}
else
{
discrete_power = llmin(4, llfloor((voice_power / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 4.f));
}
if (is_in_tuning_mode)
{
for(S32 power_bar_idx = 0; power_bar_idx < 5; power_bar_idx++)
{
std::string view_name = llformat("%s%d", "bar", power_bar_idx);
LLView* bar_view = getChild<LLView>(view_name);
if (bar_view)
{
if (power_bar_idx < discrete_power)
{
LLColor4 color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor");
gl_rect_2d(bar_view->getRect(), color, TRUE);
}
gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE);
}
}
}
}
void LLPanelVoiceDeviceSettings::apply()
{
std::string s;
if(mCtrlInputDevices)
{
s = mCtrlInputDevices->getSimple();
gSavedSettings.setString("VoiceInputAudioDevice", s);
mInputDevice = s;
}
if(mCtrlOutputDevices)
{
s = mCtrlOutputDevices->getSimple();
gSavedSettings.setString("VoiceOutputAudioDevice", s);
mOutputDevice = s;
}
// assume we are being destroyed by closing our embedding window
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
if(volume_slider)
{
F32 slider_value = (F32)volume_slider->getValue().asReal();
gSavedSettings.setF32("AudioLevelMic", slider_value);
mMicVolume = slider_value;
}
}
void LLPanelVoiceDeviceSettings::cancel()
{
gSavedSettings.setString("VoiceInputAudioDevice", mInputDevice);
gSavedSettings.setString("VoiceOutputAudioDevice", mOutputDevice);
if(mCtrlInputDevices)
mCtrlInputDevices->setSimple(mInputDevice);
if(mCtrlOutputDevices)
mCtrlOutputDevices->setSimple(mOutputDevice);
gSavedSettings.setF32("AudioLevelMic", mMicVolume);
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
if(volume_slider)
{
volume_slider->setValue(mMicVolume);
}
}
void LLPanelVoiceDeviceSettings::refresh()
{
//grab current volume
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
// set mic volume tuning slider based on last mic volume setting
F32 current_volume = (F32)volume_slider->getValue().asReal();
LLVoiceClient::getInstance()->tuningSetMicVolume(current_volume);
// Fill in popup menus
mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
if(!LLVoiceClient::getInstance()->deviceSettingsAvailable())
{
// The combo boxes are disabled, since we can't get the device settings from the daemon just now.
// Put the currently set default (ONLY) in the box, and select it.
if(mCtrlInputDevices)
{
mCtrlInputDevices->removeall();
mCtrlInputDevices->add( mInputDevice, ADD_BOTTOM );
mCtrlInputDevices->setSimple(mInputDevice);
}
if(mCtrlOutputDevices)
{
mCtrlOutputDevices->removeall();
mCtrlOutputDevices->add( mOutputDevice, ADD_BOTTOM );
mCtrlOutputDevices->setSimple(mOutputDevice);
}
}
else if (!mDevicesUpdated)
{
LLVoiceClient::deviceList *devices;
LLVoiceClient::deviceList::iterator iter;
if(mCtrlInputDevices)
{
mCtrlInputDevices->removeall();
mCtrlInputDevices->add( getString("default_text"), ADD_BOTTOM );
devices = LLVoiceClient::getInstance()->getCaptureDevices();
for(iter=devices->begin(); iter != devices->end(); iter++)
{
mCtrlInputDevices->add( *iter, ADD_BOTTOM );
}
if(!mCtrlInputDevices->setSimple(mInputDevice))
{
mCtrlInputDevices->setSimple(getString("default_text"));
}
}
if(mCtrlOutputDevices)
{
mCtrlOutputDevices->removeall();
mCtrlOutputDevices->add( getString("default_text"), ADD_BOTTOM );
devices = LLVoiceClient::getInstance()->getRenderDevices();
for(iter=devices->begin(); iter != devices->end(); iter++)
{
mCtrlOutputDevices->add( *iter, ADD_BOTTOM );
}
if(!mCtrlOutputDevices->setSimple(mOutputDevice))
{
mCtrlOutputDevices->setSimple(getString("default_text"));
}
}
mDevicesUpdated = TRUE;
}
}
void LLPanelVoiceDeviceSettings::onOpen()
{
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
mMicVolume = gSavedSettings.getF32("AudioLevelMic");
mDevicesUpdated = FALSE;
// ask for new device enumeration
LLVoiceClient::getInstance()->refreshDeviceLists();
// put voice client in "tuning" mode
LLVoiceClient::getInstance()->tuningStart();
LLVoiceChannel::suspend();
}
void LLPanelVoiceDeviceSettings::onClose(bool app_quitting)
{
LLVoiceClient::getInstance()->tuningStop();
LLVoiceChannel::resume();
}
// static
void LLPanelVoiceDeviceSettings::onCommitInputDevice(LLUICtrl* ctrl, void* user_data)
{
if(LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->setCaptureDevice(ctrl->getValue().asString());
}
}
// static
void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user_data)
{
if(LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->setRenderDevice(ctrl->getValue().asString());
}
}
//
// LLFloaterVoiceDeviceSettings
//
LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed)
: LLFloater(std::string("floater_device_settings")),
mDevicePanel(NULL)
{
mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this);
// do not automatically open singleton floaters (as result of getInstance())
BOOL no_open = FALSE;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", &mFactoryMap, no_open);
center();
}
void LLFloaterVoiceDeviceSettings::onOpen()
{
if(mDevicePanel)
{
mDevicePanel->onOpen();
}
LLFloater::onOpen();
}
void LLFloaterVoiceDeviceSettings::onClose(bool app_quitting)
{
if(mDevicePanel)
{
mDevicePanel->onClose(app_quitting);
}
setVisible(FALSE);
}
void LLFloaterVoiceDeviceSettings::apply()
{
if (mDevicePanel)
{
mDevicePanel->apply();
}
}
void LLFloaterVoiceDeviceSettings::cancel()
{
if (mDevicePanel)
{
mDevicePanel->cancel();
}
}
void LLFloaterVoiceDeviceSettings::draw()
{
if (mDevicePanel)
{
mDevicePanel->refresh();
}
LLFloater::draw();
}
// static
void* LLFloaterVoiceDeviceSettings::createPanelVoiceDeviceSettings(void* user_data)
{
LLFloaterVoiceDeviceSettings* floaterp = (LLFloaterVoiceDeviceSettings*)user_data;
floaterp->mDevicePanel = new LLPanelVoiceDeviceSettings();
return floaterp->mDevicePanel;
}

View File

@@ -1,83 +0,0 @@
/**
* @file llpanelvoicedevicesettings.h
* @author Richard Nelson
* @brief Voice communication set-up wizard
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef LL_LLFLOATERVOICEDEVICESETTINGS_H
#define LL_LLFLOATERVOICEDEVICESETTINGS_H
#include "llfloater.h"
class LLPrefsVoiceLogic;
class LLPanelVoiceDeviceSettings : public LLPanel
{
public:
LLPanelVoiceDeviceSettings();
~LLPanelVoiceDeviceSettings();
/*virtual*/ void draw();
/*virtual*/ BOOL postBuild();
void apply();
void cancel();
void refresh();
void onOpen();
void onClose(bool app_quitting);
protected:
static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data);
static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data);
F32 mMicVolume;
std::string mInputDevice;
std::string mOutputDevice;
class LLComboBox *mCtrlInputDevices;
class LLComboBox *mCtrlOutputDevices;
BOOL mDevicesUpdated;
};
class LLFloaterVoiceDeviceSettings : public LLFloater, public LLFloaterSingleton<LLFloaterVoiceDeviceSettings>
{
public:
LLFloaterVoiceDeviceSettings(const LLSD& seed);
/*virtual*/ void onOpen();
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void draw();
void apply();
void cancel();
protected:
static void* createPanelVoiceDeviceSettings(void* user_data);
LLPanelVoiceDeviceSettings* mDevicePanel;
};
#endif // LL_LLFLOATERVOICEDEVICESETTINGS_H

View File

@@ -663,12 +663,12 @@ void LLFloaterIMPanel::draw()
BOOL enable_connect = (region && region->getCapability("ChatSessionRequest") != "")
&& mSessionInitialized
&& LLVoiceClient::voiceEnabled()
&& LLVoiceClient::getInstance()->voiceEnabled()
&& mCallBackEnabled;
// hide/show start call and end call buttons
mEndCallBtn->setVisible(LLVoiceClient::voiceEnabled() && mVoiceChannel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
mStartCallBtn->setVisible(LLVoiceClient::voiceEnabled() && mVoiceChannel->getState() < LLVoiceChannel::STATE_CALL_STARTED);
mEndCallBtn->setVisible(LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
mStartCallBtn->setVisible(LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel->getState() < LLVoiceChannel::STATE_CALL_STARTED);
mStartCallBtn->setEnabled(enable_connect);
mSendBtn->setEnabled(!childGetValue("chat_editor").asString().empty());
@@ -733,11 +733,11 @@ void LLFloaterIMPanel::draw()
else
{
// refresh volume and mute checkbox
mVolumeSlider->setVisible(LLVoiceClient::voiceEnabled() && mVoiceChannel->isActive());
mVolumeSlider->setVisible(LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel->isActive());
mVolumeSlider->setValue(LLVoiceClient::getInstance()->getUserVolume(mOtherParticipantUUID));
mMuteBtn->setValue(LLMuteList::getInstance()->isMuted(mOtherParticipantUUID, LLMute::flagVoiceChat));
mMuteBtn->setVisible(LLVoiceClient::voiceEnabled() && mVoiceChannel->isActive());
mMuteBtn->setVisible(LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel->isActive());
}
LLFloater::draw();
}

View File

@@ -1720,7 +1720,7 @@ public:
return;
}
if(!LLVoiceClient::voiceEnabled())
if(!LLVoiceClient::getInstance()->voiceEnabled())
{
// Don't display voice invites unless the user has voice enabled.
return;

View File

@@ -52,22 +52,16 @@
#include <boost/tokenizer.hpp>
#include "llcrc.h"
#include "lldir.h"
#include "lldispatcher.h"
#include "llsdserialize.h"
#include "llxfermanager.h"
#include "message.h"
#include "llagent.h"
#include "llviewergenericmessage.h" // for gGenericDispatcher
#include "llviewerwindow.h"
#include "llworld.h" //for particle system banning
#include "llchat.h"
#include "llfloaterchat.h"
#include "llimpanel.h"
#include "llimview.h"
#include "llnotificationsutil.h"
#include "llnotifications.h"
#include "lluistring.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
@@ -116,6 +110,7 @@ const char BY_NAME_SUFFIX[] = " (by name)";
const char AGENT_SUFFIX[] = " (resident)";
const char OBJECT_SUFFIX[] = " (object)";
const char GROUP_SUFFIX[] = " (group)";
const char EXTERNAL_SUFFIX[] = " (avaline)";
LLMute::LLMute(const LLUUID& id, const std::string& name, EType type, U32 flags)
@@ -160,6 +155,9 @@ std::string LLMute::getDisplayName() const
case GROUP:
name_with_suffix += GROUP_SUFFIX;
break;
case EXTERNAL:
name_with_suffix += EXTERNAL_SUFFIX;
break;
}
return name_with_suffix;
}
@@ -201,6 +199,14 @@ void LLMute::setFromDisplayName(const std::string& display_name)
return;
}
pos = mName.rfind(EXTERNAL_SUFFIX);
if (pos != std::string::npos)
{
mName.erase(pos);
mType = EXTERNAL;
return;
}
llwarns << "Unable to set mute from display name " << display_name << llendl;
return;
}
@@ -224,39 +230,12 @@ LLMuteList* LLMuteList::getInstance()
// LLMuteList()
//-----------------------------------------------------------------------------
LLMuteList::LLMuteList() :
mIsLoaded(FALSE),
mUserVolumesLoaded(FALSE)
mIsLoaded(FALSE)
{
gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList);
}
void LLMuteList::loadUserVolumes()
{
// call once, after LLDir::setLindenUserDir() has been called
if (mUserVolumesLoaded)
return;
mUserVolumesLoaded = TRUE;
// load per-resident voice volume information
// conceptually, this is part of the mute list information, although it is only stored locally
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml");
LLSD settings_llsd;
llifstream file;
file.open(filename);
if (file.is_open())
{
LLSDSerialize::fromXML(settings_llsd, file);
}
for (LLSD::map_const_iterator iter = settings_llsd.beginMap();
iter != settings_llsd.endMap(); ++iter)
{
mUserVolumeSettings.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal()));
}
LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLMuteList::checkNewRegion, this));
checkNewRegion();
LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLMuteList::checkNewRegion, this));
}
//-----------------------------------------------------------------------------
@@ -264,24 +243,7 @@ void LLMuteList::loadUserVolumes()
//-----------------------------------------------------------------------------
LLMuteList::~LLMuteList()
{
// If we quit from the login screen we will not have an SL account
// name. Don't try to save, otherwise we'll dump a file in
// C:\Program Files\SecondLife\ JC
std::string user_dir = gDirUtilp->getLindenUserDir(true);
if (!user_dir.empty())
{
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml");
LLSD settings_llsd;
for(user_volume_map_t::iterator iter = mUserVolumeSettings.begin(); iter != mUserVolumeSettings.end(); ++iter)
{
settings_llsd[iter->first.asString()] = iter->second;
}
llofstream file;
file.open(filename);
LLSDSerialize::toPrettyXML(settings_llsd, file);
}
}
bool LLMuteList::isLinden(const LLUUID& id) const
@@ -333,7 +295,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
if ((mute.mType == LLMute::AGENT)
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
{
LLNotificationsUtil::add("MuteLinden");
LLNotifications::instance().add("MuteLinden", LLSD(), LLSD());
return FALSE;
}
@@ -439,6 +401,12 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
void LLMuteList::updateAdd(const LLMute& mute)
{
// External mutes (e.g. Avaline callers) are local only, don't send them to the server.
if (mute.mType == LLMute::EXTERNAL)
{
return;
}
// Update the database
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateMuteListEntry);
@@ -526,6 +494,12 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags)
void LLMuteList::updateRemove(const LLMute& mute)
{
// External mutes are not sent to the server anyway, no need to remove them.
if (mute.mType == LLMute::EXTERNAL)
{
return;
}
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RemoveMuteListEntry);
msg->nextBlockFast(_PREHASH_AgentData);
@@ -557,7 +531,7 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& full_na
LLSD args;
args["NAME"] = full_name;
LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args);
LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args, LLSD());
if (notif_ptr)
{
std::string message = notif_ptr->getMessage();
@@ -708,9 +682,14 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
it != mMutes.end();
++it)
{
it->mID.toString(id_string);
const std::string& name = it->mName;
fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags);
// Don't save external mutes as they are not sent to the server and probably won't
//be valid next time anyway.
if (it->mType != LLMute::EXTERNAL)
{
it->mID.toString(id_string);
const std::string& name = it->mName;
fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags);
}
}
fclose(fp);
return TRUE;
@@ -755,8 +734,6 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c
//-----------------------------------------------------------------------------
void LLMuteList::requestFromServer(const LLUUID& agent_id)
{
loadUserVolumes();
std::string agent_id_string;
std::string filename;
agent_id.toString(agent_id_string);
@@ -791,26 +768,6 @@ void LLMuteList::cache(const LLUUID& agent_id)
}
}
void LLMuteList::setSavedResidentVolume(const LLUUID& id, F32 volume)
{
// store new value in volume settings file
mUserVolumeSettings[id] = volume;
}
F32 LLMuteList::getSavedResidentVolume(const LLUUID& id)
{
const F32 DEFAULT_VOLUME = 0.5f;
user_volume_map_t::iterator found_it = mUserVolumeSettings.find(id);
if (found_it != mUserVolumeSettings.end())
{
return found_it->second;
}
//FIXME: assumes default, should get this from somewhere
return DEFAULT_VOLUME;
}
//-----------------------------------------------------------------------------
// Static message handlers
//-----------------------------------------------------------------------------
@@ -925,7 +882,7 @@ void LLMuteList::parseSimulatorFeatures()
{
LLSD godNames = info["god_names"]["last_names"];
for (LLSD::array_iterator godNames_it = godNames.beginArray(); godNames_it != godNames.endArray(); godNames_it++)
for (LLSD::array_iterator godNames_it = godNames.beginArray(); godNames_it != godNames.endArray(); ++godNames_it)
mGodLastNames.insert((*godNames_it).asString());
}
@@ -933,7 +890,7 @@ void LLMuteList::parseSimulatorFeatures()
{
LLSD godNames = info["god_names"]["full_names"];
for (LLSD::array_iterator godNames_it = godNames.beginArray(); godNames_it != godNames.endArray(); godNames_it++)
for (LLSD::array_iterator godNames_it = godNames.beginArray(); godNames_it != godNames.endArray(); ++godNames_it)
mGodFullNames.insert((*godNames_it).asString());
}
}

View File

@@ -45,7 +45,8 @@ class LLMute
{
public:
// Legacy mutes are BY_NAME and have null UUID.
enum EType { BY_NAME = 0, AGENT = 1, OBJECT = 2, GROUP = 3, COUNT = 4 };
// EXTERNAL mutes are only processed through an external system (e.g. Voice) and not stored.
enum EType { BY_NAME = 0, AGENT = 1, OBJECT = 2, GROUP = 3, EXTERNAL = 4, COUNT = 5 };
// Bits in the mute flags. For backwards compatibility (since any mute list entries that were created before the flags existed
// will have a flags field of 0), some of the flags are "inverted".
@@ -128,12 +129,7 @@ public:
// call this method on logout to save everything.
void cache(const LLUUID& agent_id);
void setSavedResidentVolume(const LLUUID& id, F32 volume);
F32 getSavedResidentVolume(const LLUUID& id);
private:
void loadUserVolumes();
BOOL loadFromFile(const std::string& filename);
BOOL saveToFile(const std::string& filename);
@@ -183,13 +179,9 @@ private:
observer_set_t mObservers;
BOOL mIsLoaded;
BOOL mUserVolumesLoaded;
friend class LLDispatchEmptyMuteList;
typedef std::map<LLUUID, F32> user_volume_map_t;
user_volume_map_t mUserVolumeSettings;
std::set<std::string> mGodLastNames;
std::set<std::string> mGodFullNames;
};

View File

@@ -350,7 +350,7 @@ void LLOverlayBar::refresh()
{
// update "remotes"
childSetVisible("media_remote_container", TRUE);
childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled());
childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled());
childSetVisible("AdvSettings_container", !sAdvSettingsPopup);//!gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup);//gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
childSetVisible("ao_remote_container", gSavedSettings.getBOOL("EnableAORemote"));
@@ -358,7 +358,7 @@ void LLOverlayBar::refresh()
}
}
if(!in_mouselook)
mVoiceRemoteContainer->setVisible(LLVoiceClient::voiceEnabled());
mVoiceRemoteContainer->setVisible(LLVoiceClient::getInstance()->voiceEnabled());
// always let user toggle into and out of chatbar
static const LLCachedControl<bool> chat_visible("ChatVisible",true);

View File

@@ -0,0 +1,328 @@
/**
* @file llpanelvoicedevicesettings.cpp
* @author Richard Nelson
* @brief Voice communication set-up
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llpanelvoicedevicesettings.h"
// Viewer includes
#include "llcombobox.h"
#include "llsliderctrl.h"
#include "llviewercontrol.h"
#include "llvoiceclient.h"
#include "llvoicechannel.h"
// Library includes (after viewer)
#include "lluictrlfactory.h"
static const std::string DEFAULT_DEVICE("Default");
LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
: LLPanel()
{
mCtrlInputDevices = NULL;
mCtrlOutputDevices = NULL;
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
mDevicesUpdated = FALSE;
mUseTuningMode = true;
// grab "live" mic volume level
mMicVolume = gSavedSettings.getF32("AudioLevelMic");
}
LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings()
{
}
BOOL LLPanelVoiceDeviceSettings::postBuild()
{
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
// set mic volume tuning slider based on last mic volume setting
volume_slider->setValue(mMicVolume);
mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
mCtrlInputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this));
mCtrlOutputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this));
mLocalizedDeviceNames[DEFAULT_DEVICE] = getString("default_text");
mLocalizedDeviceNames["No Device"] = getString("name_no_device");
mLocalizedDeviceNames["Default System Device"] = getString("name_default_system_device");
return TRUE;
}
// virtual
void LLPanelVoiceDeviceSettings::handleVisibilityChange ( BOOL new_visibility )
{
if (new_visibility)
{
initialize();
}
else
{
cleanup();
// when closing this window, turn off visiblity control so that
// next time preferences is opened we don't suspend voice
gSavedSettings.setBOOL("ShowDeviceSettings", FALSE);
}
}
void LLPanelVoiceDeviceSettings::draw()
{
refresh();
// let user know that volume indicator is not yet available
bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode();
getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
LLPanel::draw();
if (is_in_tuning_mode)
{
const S32 num_bars = 5;
F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
S32 discrete_power = llmin(num_bars, llfloor(voice_power * (F32)num_bars + 0.1f));
for(S32 power_bar_idx = 0; power_bar_idx < num_bars; power_bar_idx++)
{
std::string view_name = llformat("%s%d", "bar", power_bar_idx);
LLView* bar_view = getChild<LLView>(view_name);
if (bar_view)
{
gl_rect_2d(bar_view->getRect(), LLColor4::grey, TRUE);
LLColor4 color;
if (power_bar_idx < discrete_power)
{
color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor");
}
else
{
color = gSavedSettings.getColor4("FocusBackgroundColor");
}
LLRect color_rect = bar_view->getRect();
color_rect.stretch(-1);
gl_rect_2d(color_rect, color, TRUE);
}
}
}
}
void LLPanelVoiceDeviceSettings::apply()
{
std::string s;
if(mCtrlInputDevices)
{
s = mCtrlInputDevices->getValue().asString();
gSavedSettings.setString("VoiceInputAudioDevice", s);
mInputDevice = s;
}
if(mCtrlOutputDevices)
{
s = mCtrlOutputDevices->getValue().asString();
gSavedSettings.setString("VoiceOutputAudioDevice", s);
mOutputDevice = s;
}
// assume we are being destroyed by closing our embedding window
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
if(volume_slider)
{
F32 slider_value = (F32)volume_slider->getValue().asReal();
gSavedSettings.setF32("AudioLevelMic", slider_value);
mMicVolume = slider_value;
}
}
void LLPanelVoiceDeviceSettings::cancel()
{
gSavedSettings.setString("VoiceInputAudioDevice", mInputDevice);
gSavedSettings.setString("VoiceOutputAudioDevice", mOutputDevice);
if(mCtrlInputDevices)
mCtrlInputDevices->setValue(mInputDevice);
if(mCtrlOutputDevices)
mCtrlOutputDevices->setValue(mOutputDevice);
gSavedSettings.setF32("AudioLevelMic", mMicVolume);
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
if(volume_slider)
{
volume_slider->setValue(mMicVolume);
}
}
void LLPanelVoiceDeviceSettings::refresh()
{
//grab current volume
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
// set mic volume tuning slider based on last mic volume setting
F32 current_volume = (F32)volume_slider->getValue().asReal();
LLVoiceClient::getInstance()->tuningSetMicVolume(current_volume);
// Fill in popup menus
bool device_settings_available = LLVoiceClient::getInstance()->deviceSettingsAvailable();
if (mCtrlInputDevices)
{
mCtrlInputDevices->setEnabled(device_settings_available);
}
if (mCtrlOutputDevices)
{
mCtrlOutputDevices->setEnabled(device_settings_available);
}
getChild<LLSlider>("mic_volume_slider")->setEnabled(device_settings_available);
if(!device_settings_available)
{
// The combo boxes are disabled, since we can't get the device settings from the daemon just now.
// Put the currently set default (ONLY) in the box, and select it.
if(mCtrlInputDevices)
{
mCtrlInputDevices->removeall();
mCtrlInputDevices->add(getLocalizedDeviceName(mInputDevice), mInputDevice, ADD_BOTTOM);
mCtrlInputDevices->setValue(mInputDevice);
}
if(mCtrlOutputDevices)
{
mCtrlOutputDevices->removeall();
mCtrlOutputDevices->add(getLocalizedDeviceName(mOutputDevice), mOutputDevice, ADD_BOTTOM);
mCtrlOutputDevices->setValue(mOutputDevice);
}
mDevicesUpdated = FALSE;
}
else if (!mDevicesUpdated)
{
LLVoiceDeviceList::const_iterator iter;
if(mCtrlInputDevices)
{
mCtrlInputDevices->removeall();
mCtrlInputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
for(iter=LLVoiceClient::getInstance()->getCaptureDevices().begin();
iter != LLVoiceClient::getInstance()->getCaptureDevices().end();
iter++)
{
mCtrlInputDevices->add(getLocalizedDeviceName(*iter), *iter, ADD_BOTTOM);
}
// Fix invalid input audio device preference.
if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, TRUE))
{
mCtrlInputDevices->setValue(DEFAULT_DEVICE);
gSavedSettings.setString("VoiceInputAudioDevice", DEFAULT_DEVICE);
mInputDevice = DEFAULT_DEVICE;
}
}
if(mCtrlOutputDevices)
{
mCtrlOutputDevices->removeall();
mCtrlOutputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin();
iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++)
{
mCtrlOutputDevices->add(getLocalizedDeviceName(*iter), *iter, ADD_BOTTOM);
}
// Fix invalid output audio device preference.
if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, TRUE))
{
mCtrlOutputDevices->setValue(DEFAULT_DEVICE);
gSavedSettings.setString("VoiceOutputAudioDevice", DEFAULT_DEVICE);
mOutputDevice = DEFAULT_DEVICE;
}
}
mDevicesUpdated = TRUE;
}
}
void LLPanelVoiceDeviceSettings::initialize()
{
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
mMicVolume = gSavedSettings.getF32("AudioLevelMic");
mDevicesUpdated = FALSE;
// ask for new device enumeration
LLVoiceClient::getInstance()->refreshDeviceLists();
// put voice client in "tuning" mode
if (mUseTuningMode)
{
LLVoiceClient::getInstance()->tuningStart();
LLVoiceChannel::suspend();
}
}
void LLPanelVoiceDeviceSettings::cleanup()
{
if (mUseTuningMode)
{
LLVoiceClient::getInstance()->tuningStop();
LLVoiceChannel::resume();
}
}
// returns English name if no translation found
std::string LLPanelVoiceDeviceSettings::getLocalizedDeviceName(const std::string& en_dev_name)
{
std::map<std::string, std::string>::const_iterator it = mLocalizedDeviceNames.find(en_dev_name);
return it != mLocalizedDeviceNames.end() ? it->second : en_dev_name;
}
void LLPanelVoiceDeviceSettings::onCommitInputDevice()
{
if(LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->setCaptureDevice(
mCtrlInputDevices->getValue().asString());
}
}
void LLPanelVoiceDeviceSettings::onCommitOutputDevice()
{
if(LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->setRenderDevice(
mCtrlInputDevices->getValue().asString());
}
}

View File

@@ -0,0 +1,67 @@
/**
* @file llpanelvoicedevicesettings.h
* @author Richard Nelson
* @brief Voice communication set-up wizard
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLPANELVOICEDEVICESETTINGS_H
#define LL_LLPANELVOICEDEVICESETTINGS_H
#include "llpanel.h"
class LLPanelVoiceDeviceSettings : public LLPanel
{
public:
LLPanelVoiceDeviceSettings();
~LLPanelVoiceDeviceSettings();
/*virtual*/ void draw();
/*virtual*/ BOOL postBuild();
void apply();
void cancel();
void refresh();
void initialize();
void cleanup();
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
void setUseTuningMode(bool use) { mUseTuningMode = use; };
protected:
std::string getLocalizedDeviceName(const std::string& en_dev_name);
void onCommitInputDevice();
void onCommitOutputDevice();
F32 mMicVolume;
std::string mInputDevice;
std::string mOutputDevice;
class LLComboBox *mCtrlInputDevices;
class LLComboBox *mCtrlOutputDevices;
BOOL mDevicesUpdated;
bool mUseTuningMode;
std::map<std::string, std::string> mLocalizedDeviceNames;
};
#endif // LL_LLPANELVOICEDEVICESETTINGS_H

View File

@@ -37,11 +37,10 @@
#include "floatervoicelicense.h"
#include "llcheckboxctrl.h"
#include "llfloatervoicedevicesettings.h"
#include "llfocusmgr.h"
#include "llkeyboard.h"
#include "llmodaldialog.h"
#include "llviewercontrol.h"
#include "llpanelvoicedevicesettings.h"
#include "lluictrlfactory.h"
@@ -97,12 +96,22 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data)
self->close();
}
namespace
{
void* createDevicePanel(void*)
{
return new LLPanelVoiceDeviceSettings;
}
}
//--------------------------------------------------------------------
//LLPrefsVoice
LLPrefsVoice::LLPrefsVoice()
: LLPanel(std::string("Voice Chat Panel"))
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_voice.xml");
{
mFactoryMap["device_settings_panel"] = LLCallbackMap(createDevicePanel, NULL);
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_voice.xml", &getFactoryMap());
}
LLPrefsVoice::~LLPrefsVoice()
@@ -114,7 +123,6 @@ BOOL LLPrefsVoice::postBuild()
childSetCommitCallback("enable_voice_check", onCommitEnableVoiceChat, this);
childSetAction("set_voice_hotkey_button", onClickSetKey, this);
childSetAction("set_voice_middlemouse_button", onClickSetMiddleMouse, this);
childSetAction("device_settings_btn", onClickVoiceDeviceSettings, this);
BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice");
childSetVisible("voice_unavailable", voice_disabled);
@@ -132,6 +140,8 @@ BOOL LLPrefsVoice::postBuild()
childSetValue("ear_location", gSavedSettings.getS32("VoiceEarLocation"));
childSetValue("enable_lip_sync_check", gSavedSettings.getBOOL("LipSyncEnabled"));
gSavedSettings.getControl("ShowDeviceSettings")->getSignal()->connect(boost::bind(&LLPanel::childSetVisible, this, "device_settings_panel", _2)); // Singu TODO: visibility_control
return TRUE;
}
@@ -144,8 +154,7 @@ void LLPrefsVoice::apply()
gSavedSettings.setS32("VoiceEarLocation", childGetValue("ear_location"));
gSavedSettings.setBOOL("LipSyncEnabled", childGetValue("enable_lip_sync_check"));
LLFloaterVoiceDeviceSettings* voice_device_settings = LLFloaterVoiceDeviceSettings::getInstance();
if(voice_device_settings)
if (LLPanelVoiceDeviceSettings* voice_device_settings = getChild<LLPanelVoiceDeviceSettings>("device_settings_panel"))
{
voice_device_settings->apply();
}
@@ -165,8 +174,7 @@ void LLPrefsVoice::apply()
void LLPrefsVoice::cancel()
{
LLFloaterVoiceDeviceSettings* voice_device_settings = LLFloaterVoiceDeviceSettings::getInstance();
if(voice_device_settings)
if (LLPanelVoiceDeviceSettings* voice_device_settings = getChild<LLPanelVoiceDeviceSettings>("device_settings_panel"))
{
voice_device_settings->cancel();
}
@@ -186,7 +194,6 @@ void LLPrefsVoice::onCommitEnableVoiceChat(LLUICtrl* ctrl, void* user_data)
bool enable = enable_voice_chat->getValue();
self->childSetEnabled("modifier_combo", enable);
//self->childSetEnabled("friends_only_check", enable);
self->childSetEnabled("push_to_talk_label", enable);
self->childSetEnabled("voice_call_friends_only_check", enable);
self->childSetEnabled("auto_disengage_mic_check", enable);
@@ -196,6 +203,7 @@ void LLPrefsVoice::onCommitEnableVoiceChat(LLUICtrl* ctrl, void* user_data)
self->childSetEnabled("set_voice_hotkey_button", enable);
self->childSetEnabled("set_voice_middlemouse_button", enable);
self->childSetEnabled("device_settings_btn", enable);
self->childSetEnabled("device_settings_panel", enable);
}
//static
@@ -213,15 +221,3 @@ void LLPrefsVoice::onClickSetMiddleMouse(void* user_data)
self->childSetValue("modifier_combo", "MiddleMouse");
}
//static
void LLPrefsVoice::onClickVoiceDeviceSettings(void* user_data)
{
LLPrefsVoice* voice_prefs = (LLPrefsVoice*)user_data;
LLFloaterVoiceDeviceSettings* device_settings_floater = LLFloaterVoiceDeviceSettings::showInstance();
LLFloater* parent_floater = gFloaterView->getParentFloater(voice_prefs);
if(parent_floater)
{
parent_floater->addDependentFloater(device_settings_floater, FALSE);
}
}

View File

@@ -52,7 +52,6 @@ private:
static void onCommitEnableVoiceChat(LLUICtrl* ctrl, void* user_data);
static void onClickSetKey(void* user_data);
static void onClickSetMiddleMouse(void* user_data);
static void onClickVoiceDeviceSettings(void* user_data);
};
#endif // LLPREFSVOICE_H

View File

@@ -211,6 +211,7 @@
#include "llwearable.h"
#include "llinventorybridge.h"
#include "llappearancemgr.h"
#include "llvoicechannel.h"
#include "jcfloaterareasearch.h"
#include "generichandlers.h"
@@ -1591,8 +1592,10 @@ bool idle_startup()
name += " " + lastname;
}
gViewerWindow->getWindow()->setTitle(LLAppViewer::instance()->getWindowTitle() + "- " + name);
// Pass the user information to the voice chat server interface.
LLVoiceClient::getInstance()->userAuthorized(firstname, lastname, gAgentID);
// Pass the user information to the voice chat server interface.
LLVoiceClient::getInstance()->userAuthorized(name, gAgentID);
// create the default proximal channel
LLVoiceChannel::initClass();
LLStartUp::setStartupState( STATE_WORLD_INIT );
}
else
@@ -1879,6 +1882,11 @@ bool idle_startup()
LLStartUp::initNameCache();
display_startup();
// update the voice settings *after* gCacheName initialization
// so that we can construct voice UI that relies on the name cache
LLVoiceClient::getInstance()->updateSettings();
display_startup();
// *Note: this is where gWorldMap used to be initialized.
// register null callbacks for audio until the audio system is initialized

View File

@@ -2373,10 +2373,10 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
{
bool render_visualizer = voice_enabled;
// Don't render the user's own voice visualizer when in mouselook
// Don't render the user's own voice visualizer when in mouselook, or when opening the mic is disabled.
if(isSelf())
{
if(gAgentCamera.cameraMouselook()/* || gSavedSettings.getBOOL("VoiceDisableMic")*/)
if(gAgentCamera.cameraMouselook() || gSavedSettings.getBOOL("VoiceDisableMic"))
{
render_visualizer = false;
}

View File

@@ -277,6 +277,7 @@ void LLVoiceChannel::deactivate()
LLVoiceClient::getInstance()->getUserPTTState())
{
gSavedSettings.setBOOL("PTTCurrentlyEnabled", true);
LLVoiceClient::getInstance()->inputUserControlState(true);
}
}
@@ -464,6 +465,12 @@ void LLVoiceChannelGroup::activate()
LLVoiceClient::getInstance()->setNonSpatialChannel(
mURI,
mCredentials);
//Mic default state is OFF on initiating/joining Ad-Hoc/Group calls
if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle())
{
LLVoiceClient::getInstance()->inputUserControlState(true);
}
}
}
@@ -653,6 +660,8 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status)
// do not notify user when leaving proximal channel
return;
case STATUS_VOICE_DISABLED:
//skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749)
if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking())
{
gIMMgr->addSystemMessage(LLUUID::null, "unavailable", mNotifyArgs);
}
@@ -788,6 +797,12 @@ void LLVoiceChannelP2P::activate()
// using the session handle invalidates it. Clear it out here so we can't reuse it by accident.
mSessionHandle.clear();
}
//Default mic is ON on initiating/joining P2P calls
if (!LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle())
{
LLVoiceClient::getInstance()->inputUserControlState(true);
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -166,7 +166,7 @@ void LLVoiceRemoteCtrl::draw()
LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel();
if (LLButton* end_call_btn = findChild<LLButton>("end_call_btn"))
end_call_btn->setEnabled(LLVoiceClient::voiceEnabled()
end_call_btn->setEnabled(LLVoiceClient::getInstance()->voiceEnabled()
&& current_channel
&& current_channel->isActive()
&& current_channel != LLVoiceChannelProximal::getInstance());

File diff suppressed because it is too large Load Diff

1016
indra/newview/llvoicevivox.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater bottom="0" can_drag_on_left="false" can_minimize="true" can_resize="false"
height="260" left="0" name="floater_device_settings"
title="Voice Chat Device Settings" width="405">
<panel bottom="0" filename="panel_audio_device.xml" left="2" name="device_settings"
right="-5" top="-20" />
</floater>

View File

@@ -7284,6 +7284,56 @@ We are creating a voice channel for you. This may take up to one minute.
<unique/>
</notification>
<notification
icon="notify.tga"
name="VoiceEffectsExpired"
sound="UISndAlert"
persist="true"
type="notify">
<unique/>
One or more of your subscribed Voice Morphs has expired.
[[URL] Click here] to renew your subscription.
<tag>fail</tag>
<tag>voice</tag>
</notification>
<notification
icon="notify.tga"
name="VoiceEffectsExpiredInUse"
sound="UISndAlert"
persist="true"
type="notify">
<unique/>
The active Voice Morph has expired, your normal voice settings have been applied.
[[URL] Click here] to renew your subscription.
<tag>fail</tag>
<tag>voice</tag>
</notification>
<notification
icon="notify.tga"
name="VoiceEffectsWillExpire"
sound="UISndAlert"
persist="true"
type="notify">
<unique/>
One or more of your Voice Morphs will expire in less than [INTERVAL] days.
[[URL] Click here] to renew your subscription.
<tag>fail</tag>
<tag>voice</tag>
</notification>
<notification
icon="notify.tga"
name="VoiceEffectsNew"
sound="UISndAlert"
persist="true"
type="notify">
<unique/>
New Voice Morphs are available!
<tag>voice</tag>
</notification>
<notification
icon="notifytip.tga"
name="Cannot enter parcel: not a group member"
@@ -7422,6 +7472,23 @@ Avatar '[NAME]' left after [TIME] seconds as cloud.
Avatar '[NAME]' entered appearance mode.
</notification>
<notification
icon="alertmodal.tga"
name="NoVoiceConnect"
type="alertmodal">
We're having trouble connecting to your voice server:
[HOSTID]
Voice communications will not be available.
Please check your network and firewall setup.
<tag>voice</tag>
<tag>fail</tag>
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="notifytip.tga"
name="AvatarRezLeftAppearanceNotification"

View File

@@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel border="false" bottom="0" enabled="true" height="240" left="8"
mouse_opaque="true" name="device_settings" width="404">
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="6"
mouse_opaque="true" name="Audio Devices" v_pad="0" width="200">
Audio Devices
</text>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-22" drop_shadow_visible="true" enabled="true"
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
height="16" left="20" mouse_opaque="true" name="Input device (microphone):"
v_pad="0" width="200">
Input device (microphone):
</text>
<combo_box allow_text_entry="false" bottom_delta="-20" enabled="true" follows="left|top"
height="18" left_delta="0" max_chars="128" mouse_opaque="true"
name="voice_input_device" width="225" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-25" drop_shadow_visible="true" enabled="true"
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
height="16" left_delta="0" mouse_opaque="true"
name="Output device (speakers):" v_pad="0" width="200">
Output device (speakers):
</text>
<combo_box allow_text_entry="false" bottom_delta="-20" enabled="true" follows="left|top"
height="18" left_delta="0" max_chars="128" mouse_opaque="true"
name="voice_output_device" width="225" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-30" drop_shadow_visible="true" enabled="true"
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
height="16" left="6" mouse_opaque="true" name="Input level:" v_pad="0"
width="200">
Input Level
</text>
<text_editor type="string" length="1" allow_html="false" bg_readonly_color="0 0 0 0" embedded_items="false"
enabled="false" font="SansSerifSmall" height="60" hide_border="true"
hide_scrollbar="true" left_delta="10" max_length="65535"
mouse_opaque="true" name="voice_intro_text1" tab_stop="false" width="380"
word_wrap="true">
Adjust the slider to control how loud you sound to other Residents. To test the input level, simply speak into your microphone.
</text_editor>
<volume_slider bottom_delta="-18" enabled="true" follows="left|top" height="17"
increment="0.05" initial_val="1.0" left_delta="5" max_val="2" min_val="0"
mouse_opaque="true" name="mic_volume_slider"
tool_tip="Change the volume using this slider" width="90" />
<text bottom_delta="-4" follows="left|top" height="20" left_delta="95"
name="wait_text" width="200">
Please wait
</text>
<locate bottom_delta="-5" height="20" left_delta="0" name="bar0" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar1" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar2" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar3" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar4" width="20" />
<string name="default_text">
Default
</string>
</panel>

View File

@@ -7,22 +7,14 @@
<radio_item bottom="-35" height="16" name="1">Hear Voice Chat from avatar position.</radio_item>
</radio_group>
<text bottom_delta="-20" follows="top" height="16" name="push_to_talk_heading">Push To Talk</text>
<text bottom_delta="-77" follows="top" height="65" left_delta="20" name="voice_chat_description">
Push-to-Talk mode lets you control when your voice is transmitted. When in toggle mode,
press and release the push-to-talk trigger to switch your microphone on and off.
When not in toggle mode, the microphone is active only when the trigger is held down.
</text>
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Use Push-to-Talk in toggle mode" name="push_to_talk_toggle_check"/>
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Use Push-to-Talk in toggle mode" name="push_to_talk_toggle_check" tool_tip="When enabled, press the push-to-talk trigger to switch your microphone on and off. When disabled, the microphone is off unless the trigger is being held down."/>
<text bottom_delta="-20" follows="top" height="16" left_delta="4" name="push_to_talk_label">Push-to-Talk trigger:</text>
<line_editor bottom_delta="-20" follows="top" height="19" name="modifier_combo" width="280"/>
<button bottom_delta="-25" follows="top" height="20" label="Set Key" name="set_voice_hotkey_button" width="115"/>
<button bottom_delta="0" follows="top" height="20" label="Middle Mouse Button" left_delta="120" name="set_voice_middlemouse_button" width="160"/>
<text bottom_delta="-25" follows="top" height="16" left="28" name="lip_sync_heading" width="445">Lip Sync Mouth Animation</text>
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Enable lip sync animation" left_delta="20" name="enable_lip_sync_check"/>
<text bottom_delta="-25" follows="top" height="16" left="28" name="privacy_heading">Privacy Options</text>
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Only accept voice calls from people on My Friends list" left_delta="20" name="voice_call_friends_only_check"/>
<check_box bottom_delta="-24" follows="top" height="16" initial_value="false" label="Enable lip sync animation" left="28" name="enable_lip_sync_check"/>
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Only accept voice calls from people on My Friends list" name="voice_call_friends_only_check"/>
<check_box bottom_delta="-18" follows="top" height="16" initial_value="false" label="Switch off microphone when ending IM calls" name="auto_disengage_mic_check"/>
<button bottom_delta="-40" follows="top" height="20" label="Device Settings" left="28" mouse_opaque="true" name="device_settings_btn" width="155"/>
<text bottom_delta="-36" follows="top" height="35" left_delta="6" name="device_settings_text">NOTE: Running the Device Settings will temporarily disconnect you from Voice Chat,
and changes you make will be immediately applied.</text>
<button control_name="ShowDeviceSettings" toggle="true" bottom_delta="-40" follows="top" height="20" label="Device Settings" mouse_opaque="true" name="device_settings_btn" width="155" tool_tip="Running the Device Settings will temporarily disconnect you from Voice Chat, and changes you make will be immediately applied."/>
<panel name="device_settings_panel" filename="panel_sound_devices.xml" follows="all" visible="false"/>
</panel>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel border="false" bottom="0" enabled="true" height="240" left="8"
mouse_opaque="true" name="device_settings_panel" width="404">
<string
name="default_text">
Default
</string>
<string
name="name_no_device">
No Device
</string>
<string
name="name_default_system_device">
Default System Device
</string>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-22" drop_shadow_visible="true" enabled="true"
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
height="16" left="20" mouse_opaque="true" name="Input"
v_pad="0" width="200">
Input (microphone):
</text>
<combo_box control_name="VoiceInputAudioDevice" allow_text_entry="false" bottom_delta="-20" enabled="true" follows="left|top"
height="18" left_delta="0" max_chars="128" mouse_opaque="true"
name="voice_input_device" width="225" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-54" drop_shadow_visible="true" enabled="true"
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
height="16" left_delta="0" mouse_opaque="true"
name="Output" v_pad="0" width="200">
Output (speakers):
</text>
<combo_box control_name="VoiceOutputAudioDevice" allow_text_entry="false" bottom_delta="-20" enabled="true" follows="left|top"
height="18" left_delta="0" max_chars="128" mouse_opaque="true"
name="voice_output_device" width="225" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="52" drop_shadow_visible="true" enabled="true"
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left"
height="16" mouse_opaque="true" name="My volume label" v_pad="0"
width="200">
Input Level:
</text>
<volume_slider control_name="AudioLevelMic" bottom_delta="-12" left_delta="-6" follows="left|top" height="17"
increment="0.05" initial_val="1.0" max_val="2" min_val="0"
mouse_opaque="true" name="mic_volume_slider"
tool_tip="Change the volume using this slider" width="120" />
<text bottom_delta="-4" follows="left|top" height="20" left_delta="120"
name="wait_text" width="200">
Please wait
</text>
<locate bottom_delta="40" height="20" left_delta="0" name="bar0" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar1" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar2" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar3" width="20" />
<locate bottom_delta="0" height="20" left_delta="22" name="bar4" width="20" />
</panel>

View File

@@ -4110,6 +4110,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Home position set.">Home position set.</string>
<string name="voice_morphing_url">http://secondlife.com/landing/voicemorphing</string>
<!-- Financial operations strings -->
<string name="paid_you_ldollars">[NAME] paid you [CURRENCY][AMOUNT] [REASON].</string>
<string name="paid_you_ldollars_no_reason">[NAME] paid you [CURRENCY][AMOUNT].</string>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="floater_device_settings" title="Configuración Dispositivos de Voz"/>

View File

@@ -4077,6 +4077,25 @@ Pulsa Aceptar para entrar al chat o Rehusar para declinar la invitación. Pulsa
<notification name="VoiceLoginRetry">
Estamos creando un canal de voz para ti. Esto puede tardar hasta un minuto.
</notification>
<notification name="VoiceEffectsExpired">
Una o más de las transformaciones de voz a las que estás suscrito han caducado.
[Pulsa aquí [URL]] para renovar la suscripción.
</notification>
<notification name="VoiceEffectsExpiredInUse">
La transformación de voz activa ha caducado y se ha aplicado tu configuración de voz normal.
[Pulsa aquí [URL]] para renovar la suscripción.
</notification>
<notification name="VoiceEffectsWillExpire">
Una o más de tus transformaciones de voz caducarán en menos de [INTERVAL] días.
[Pulsa aquí [URL]] para renovar la suscripción.
</notification>
<notification name="VoiceEffectsNew">
Están disponibles nuevas transformaciones de voz.
</notification>
<notification name="Cannot enter parcel: not a group member">
No puedes entrar en esta parcela, no eres miembro del grupo adecuado.
@@ -4157,6 +4176,16 @@ Avatar '[NAME]' se fué después de [TIME] segundos siendo nube.
Avatar '[NAME]' ha entrado en edición de Apariencia.
</notification>
<notification name="NoVoiceConnect">
Tenemos problemas de conexión con tu servidor de voz:
[HOSTID]
No podrás establecer comunicaciones de voz.
Comprueba la configuración de la red y del servidor de seguridad.
<usetemplate name="okbutton" yestext="OK"/>
</notification>
<notification name="AvatarRezLeftAppearanceNotification">
( [EXISTENCE] segundos vivo )
Avatar '[NAME]' ha abandonado la edición de su Apariencia.

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="device_settings">
<text name="Audio Devices">
Dispositivos de Audio
</text>
<text name="Input device (microphone):">
Dispostitivo de Entrada (micrófono):
</text>
<text name="Output device (speakers):">
Dispositivo de Salida (parlantes):
</text>
<text name="Input level:">
Nivel de Entrada
</text>
<text_editor name="voice_intro_text1">
Ajusta el control deslizante para variar el volumen en que te escucharán los otros residentes. Para probar el nivel de entrada, simplemente habla en tu micrófono.
</text_editor>
<volume_slider name="mic_volume_slider" tool_tip="Cambia el volumen usando este control deslizante" />
<text name="wait_text">
Espera por favor
</text>
<string name="default_text">
Por defecto
</string>
</panel>

View File

@@ -15,30 +15,14 @@
<text name="push_to_talk_heading">
Apretar para Hablar
</text>
<text name="voice_chat_description">
El modo Apretar para Hablar controla cuándo tu voz se transmite. En el modo
'un toque', pulsa y suelta el botón Apretar para Hablar para activar y desactivar
tu micrófono. Si no se está en el modo 'un toque', el micrófono está activo
sólo cuando se mantiene pulsado el botón.
</text>
<check_box label="Usar Apretar para Hablar en el modo 'Un Toque'" name="push_to_talk_toggle_check"/>
<check_box label="Usar Apretar para Hablar en el modo 'Un Toque'" name="push_to_talk_toggle_check" tool_tip="El modo Apretar para Hablar controla cuándo tu voz se transmite. En el modo 'un toque', pulsa y suelta el botón Apretar para Hablar para activar y desactivar tu micrófono. Si no se está en el modo 'un toque', el micrófono está activo sólo cuando se mantiene pulsado el botón."/>
<text name="push_to_talk_label">
Botón Apretar para Hablar:
</text>
<button label="Definir Tecla" name="set_voice_hotkey_button" width="115"/>
<button label="Botón medio del Ratón" left_delta="120" name="set_voice_middlemouse_button" width="160"/>
<text name="lip_sync_heading" width="445">
Activar animación de Labios
</text>
<check_box label="Activar Animación de Labios" left_delta="20" name="enable_lip_sync_check"/>
<text name="privacy_heading">
Opciones de Privacidad
</text>
<check_box label="Aceptar llamadas sólo de mis contactos" left_delta="20" name="voice_call_friends_only_check"/>
<check_box label="Aceptar llamadas sólo de mis contactos" name="voice_call_friends_only_check"/>
<check_box label="Apagar el micrófono al terminar la llamada por MI" name="auto_disengage_mic_check"/>
<button label="Configuración de Dispositivos" left="28" name="device_settings_btn" width="200"/>
<text name="device_settings_text">
NOTA: Ejecutar esta configuración te desconectará temporalmente del chat de voz,
y los cambios se aplicarán inmediatamente..
</text>
<button label="Configuración de Dispositivos" name="device_settings_btn" width="200" tool_tip="Ejecutar esta configuración te desconectará temporalmente del chat de voz, y los cambios se aplicarán inmediatamente.."/>
</panel>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<panel label="Configuración del dispositivo" name="device_settings_panel">
<string name="default_text">
Por defecto
</string>
<string name="name_no_device">
Ningún dispositivo
</string>
<string name="name_default_system_device">
Dispositivo del sistema por defecto
</string>
<text name="Input">
Entrada
</text>
<text name="Output">
Salida
</text>
<text name="My volume label">
Mi volumen:
</text>
<slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="Cambia el volumen usando este deslizable"/>
<text name="wait_text">
Por favor, espera
</text>
</panel>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="floater_device_settings" title="Paramètres du matériel utilisé pour le chat vocal"/>

View File

@@ -3674,6 +3674,25 @@ Echec de la connexion avec [VOICE_CHANNEL_NAME], veuillez réessayer ultérieure
Nous sommes en train de créer un canal vocal pour vous. Veuillez patienter quelques instants.
</notification>
<notification name="VoiceEffectsExpired">
Au moins l'un des effets de voix auxquels vous êtes abonné a expiré.
[[URL] Cliquez ici] pour renouveler votre abonnement.
</notification>
<notification name="VoiceEffectsExpiredInUse">
L'effet de voix actif a expiré. Vos paramètres de voix normaux ont été rétablis.
[[URL] Cliquez ici] pour renouveler votre abonnement.
</notification>
<notification name="VoiceEffectsWillExpire">
Au moins l'un de vos effets de voix expirera dans moins de [INTERVAL] jours.
[[URL] Cliquez ici] pour renouveler votre abonnement.
</notification>
<notification name="VoiceEffectsNew">
De nouveaux effets de voix sont disponibles !
</notification>
<notification name="Cannot enter parcel: not a group member">
Vous ne pouvez pas pénétrer sur ce terrain car vous n'êtes pas membre du groupe adéquat.
</notification>
@@ -3819,6 +3838,15 @@ votre display name doit contenir des lettres autres que de la simple ponctuation
[OLD_NAME] ([SLID]) est maintenant connu(e) comme [NEW_NAME].
</notification>
<notification name="NoVoiceConnect">
Problèmes de connexion à votre serveur vocal :
[HOSTID]
Aucune communication vocale n&apos;est disponible.
Veuillez vérifier la configuration de votre réseau et de votre pare-feu.
<usetemplate name="okbutton" yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="device_settings">
<text name="Audio Devices">
Matériel audio
</text>
<text name="Input device (microphone):">
Périphérique d'entrée (micro):
</text>
<text name="Output device (speakers):">
Périphérique de sortie (haut-parleurs):
</text>
<text name="Input level:">
Volume d'entrée
</text>
<text_editor name="voice_intro_text1">
Pour que les autres résidents vous entendent plus ou moins fort, utilisez le curseur. Pour tester le volume, parlez dans le micro.
</text_editor>
<volume_slider name="mic_volume_slider" tool_tip="Réglez le volume avec ce curseur."/>
<text name="wait_text">
Veuillez patienter...
</text>
<string name="default_text">
Défaut
</string>
</panel>

View File

@@ -7,23 +7,12 @@
<radio_item name="1">Ecouter depuis la position de l'avatar</radio_item>
</radio_group>
<text name="push_to_talk_heading">Appuyer pour parler</text>
<text name="voice_chat_description">
Ce mode vous permet de contrôler l'ouverture du micro en mode bascule.
Cliquez sur la touche de contrôle ou le bouton &#x22;Parler&#x22; pour ouvrir et fermer le micro.
Si vous n'êtes pas en mode bascule, le micro n'est ouvert que si vous cliquez et
maintenez enfoncés la touche de contrôle ou appuyez sur le bouton &#x22;Parler&#x22;.
</text>
<check_box label="Utiliser &#x22;Appuyer pour Parler&#x22; en mode bascule" name="push_to_talk_toggle_check"/>
<check_box label="Utiliser &#x22;Appuyer pour Parler&#x22; en mode bascule" name="push_to_talk_toggle_check" tool_tip="Ce mode vous permet de contrôler l'ouverture du micro en mode bascule. Cliquez sur la touche de contrôle ou le bouton &#x22;Parler&#x22; pour ouvrir et fermer le micro. Si vous n'êtes pas en mode bascule, le micro n'est ouvert que si vous cliquez et maintenez enfoncés la touche de contrôle ou appuyez sur le bouton &#x22;Parler&#x22;."/>
<text name="push_to_talk_label">Touche de contrôle:</text>
<button bottom_delta="-25" label="Choisir la touche" name="set_voice_hotkey_button"/>
<button label="Choisir la touche" name="set_voice_hotkey_button"/>
<button label="Molette de la souris" name="set_voice_middlemouse_button"/>
<text name="lip_sync_heading">Animation en mode &#x22;voice&#x22;</text>
<check_box label="Activer l'animation des lèvres" name="enable_lip_sync_check"/>
<text name="privacy_heading">Options de confidentialité</text>
<check_box label="N'accepter que les appels des amis" name="voice_call_friends_only_check"/>
<check_box label="Fermer le micro à la fin d'un appel privé" name="auto_disengage_mic_check"/>
<button label="Paramètres du matériel" name="device_settings_btn"/>
<text name="device_settings_text">Remarque : Si vous cliquez sur Paramètres du matériel,
vous serez temporairement déconnecté(e) du Chat vocal.
Tous les changements que vous faites seront immédiatement appliqués.</text>
<button label="Paramètres du matériel" name="device_settings_btn" tool_tip="Si vous cliquez sur Paramètres du matériel, vous serez temporairement déconnecté(e) du Chat vocal. Tous les changements que vous faites seront immédiatement appliqués."/>
</panel>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<panel label="Paramètres du périphérique" name="device_settings_panel">
<string name="default_text">
Valeur par défaut
</string>
<string name="name_no_device">
Aucun périphérique
</string>
<string name="name_default_system_device">
Périphérique système par défaut
</string>
<text name="Input">
Entrée
</text>
<text name="Output">
Sortie
</text>
<text name="My volume label">
Mon volume :
</text>
<slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="Régler le volume avec le curseur."/>
<text name="wait_text">
Veuillez patienter
</text>
</panel>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_device_settings" title="Ajustes do Dispositivo de Conversa por Voz"/>

View File

@@ -3284,6 +3284,15 @@ Autorizar este pedido?
</form>
</notification>
<notification name="NoVoiceConnect">
Estamos tendo problemas de conexão com o seu servidor de voz:
[HOSTID]
Talvez não seja possível se comunicar via voz.
Verifique a configuração da sua rede e firewall.
<usetemplate name="okbutton" yestext="OK"/>
</notification>
<notification name="FirstBalanceIncrease">
Você recebeu uma quantia de [CURRENCY][AMOUNT].
@@ -3463,6 +3472,25 @@ Clique Aceitar para juntar-se à chamada ou Recusar para recusar o convite. Cliq
Estamos criando uma canal de voz para você. Isto pode levar até um minuto.
</notification>
<notification name="VoiceEffectsExpired">
Um ou mais serviços de distorção de voz que você assinou veceu.
[[URL] Clique aqui] para renovar o serviço.
</notification>
<notification name="VoiceEffectsExpiredInUse">
A Distorção de voz ativa expirou. Suas configurações de voz padrão foram ativadas.
[[URL] Clique aqui] para renovar o serviço.
</notification>
<notification name="VoiceEffectsWillExpire">
Uma ou mais das suas distorções de voz tem vencimento em menos de [INTERVAL] dias.
[[URL] Clique aqui] para renovar o serviço.
</notification>
<notification name="VoiceEffectsNew">
Novas Distorções de voz!
</notification>
<notification name="Cannot enter parcel: not a group member">
Você não pode entrar nessa terra, você não é membro do grupo autorizado.
</notification>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="device_settings">
<text name="Audio Devices">
Dispositivos de Áudio
</text>
<text name="Input device (microphone):">
Dispositivo de entrada (microfone):
</text>
<text name="Output device (speakers):">
Dispositivo de saída (falantes):
</text>
<text name="Input level:">
Nível de Entrada
</text>
<text_editor name="voice_intro_text1">
Ajuste a barra para controlar o volume de som para os outros residentes. Para testar o nível de entrada, basta falar em seu microfone.
</text_editor>
<volume_slider name="mic_volume_slider" tool_tip="Altere o volume usando este controle gradual"/>
<text name="wait_text">
Por Favor aguarde
</text>
<string name="default_text">
Padrão
</string>
</panel>

View File

@@ -15,22 +15,10 @@
<text name="push_to_talk_heading">
Pressione para falar
</text>
<text_editor name="voice_chat_description" width="465" bottom_delta="-76" height="81" >
O modo Pressione-para-falar permite que você controle quando a sua voz é transmitida. Quando quiser alternar o modo, pressione e solte o botão pressione-para-falar para mudar o seu microfone de ligado para desligado. Quando não estiver em modo alternado, o microfone estará ativo apenas quando o botão estiver mantido para baixo.
</text_editor>
<check_box label="Use Pressione-para-falar em modo alternado" name="push_to_talk_toggle_check"/>
<text name="push_to_talk_label">
Gatilho do Pressione-para-Falar:
</text>
<check_box label="Use Pressione-para-falar em modo alternado" name="push_to_talk_toggle_check" tool_tip="O modo Pressione-para-falar permite que você controle quando a sua voz é transmitida. Quando quiser alternar o modo, pressione e solte o botão pressione-para-falar para mudar o seu microfone de ligado para desligado. Quando não estiver em modo alternado, o microfone estará ativo apenas quando o botão estiver mantido para baixo."/>
<button label="Definir tecla" name="set_voice_hotkey_button"/>
<button label="Botão do meio do mouse" name="set_voice_middlemouse_button"/>
<text name="privacy_heading">
Opções de privacidade
</text>
<check_box label="Apenas aceitar chamadas de voz das pessoas da minha Lista de amigos" name="voice_call_friends_only_check"/>
<check_box label="Desligar o microfone quando terminar chamadas por MI" name="auto_disengage_mic_check"/>
<button label="Configurações do dispositivo" name="device_settings_btn" width="180"/>
<text_editor bottom_delta="-45" height="48" name="device_settings_text">
NOTA: Executar as configurações do dispositivo vai desligá-lo temporariamente do Bate- papo de voz e as mudanças que você fizer serão imediatamente aplicadas.
</text_editor>
<button label="Configurações do dispositivo" name="device_settings_btn" width="180" tool_tip="Executar as configurações do dispositivo vai desligá-lo temporariamente do Bate- papo de voz e as mudanças que você fizer serão imediatamente aplicadas."/>
</panel>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<panel label="Configuração de dispositivos" name="device_settings_panel">
<string name="default_text">
Padrão
</string>
<string name="name_no_device">
Nenhum
</string>
<string name="name_default_system_device">
Dispositivo padrão do sistema
</string>
<text name="Input">
Entrada
</text>
<text name="Output">
Saída
</text>
<text name="My volume label">
Meu volume:
</text>
<slider_bar initial_value="1.0" name="mic_volume_slider" tool_tip="Mude o volume usando o controle deslizante"/>
<text name="wait_text">
Aguarde
</text>
</panel>