[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

@@ -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);
}
}