summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatervoicedevicesettings.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-12-11 15:06:32 +0000
committerLynx Linden <lynx@lindenlab.com>2009-12-11 15:06:32 +0000
commiteda8634b17133df5f3104d96ad56d3626a90aad8 (patch)
treee2b8a1789cf818c207f0b279ac46b295444ad5e1 /indra/newview/llfloatervoicedevicesettings.cpp
parent9f0e4f668395eb7b55cb48a949e3aebcf46f1bcd (diff)
EXT-3394: Remove manual voice gain controls.
The new Vivox SDK supports Automatic Gain Control (AGC), so we shouldn't need to change the local gain level from the default of 50%. This change sets the initial gain level to 50 (instead of 62) and removes the local gain sliders from the Sound Preferences floater and the Voice Controls floater. The latter was not hooked up yet anyway.
Diffstat (limited to 'indra/newview/llfloatervoicedevicesettings.cpp')
-rw-r--r--indra/newview/llfloatervoicedevicesettings.cpp32
1 files changed, 2 insertions, 30 deletions
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 43024a4bd0..3951f4291f 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -40,7 +40,6 @@
#include "llcombobox.h"
#include "llfocusmgr.h"
#include "lliconctrl.h"
-#include "llsliderctrl.h"
#include "llviewercontrol.h"
#include "llvoiceclient.h"
#include "llvoicechannel.h"
@@ -61,9 +60,6 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
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...
//gVoiceClient->refreshDeviceLists();
@@ -75,10 +71,6 @@ 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);
@@ -157,15 +149,6 @@ void LLPanelVoiceDeviceSettings::apply()
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()
@@ -178,22 +161,12 @@ void LLPanelVoiceDeviceSettings::cancel()
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();
- gVoiceClient->tuningSetMicVolume(current_volume);
+ // update the live input level display
+ gVoiceClient->tuningSetMicVolume();
// Fill in popup menus
mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
@@ -263,7 +236,6 @@ void LLPanelVoiceDeviceSettings::initialize()
{
mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
- mMicVolume = gSavedSettings.getF32("AudioLevelMic");
mDevicesUpdated = FALSE;
// ask for new device enumeration