summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/linux_tools/client-readme-voice.txt5
-rw-r--r--indra/newview/llvoiceclient.cpp26
2 files changed, 24 insertions, 7 deletions
diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt
index ff1d4b23b9..7754a3a734 100644
--- a/indra/newview/linux_tools/client-readme-voice.txt
+++ b/indra/newview/linux_tools/client-readme-voice.txt
@@ -21,6 +21,7 @@ REQUIREMENTS
Success with Linux Voice support has been reported on the following
systems:
+* Ubuntu 7.04 (Feisty) with USB Plantronics headset
* Ubuntu 7.04 (Feisty) with Intel HDA audio chipset
* Ubuntu 6.06 (Dapper) with Intel ICH5/CMI9761A+ audio chipset
* Ubuntu 6.06 (Dapper) with SigmaTel STAC2997 audio chipset
@@ -36,10 +37,6 @@ KNOWN PROBLEMS
* The 'Input Level' meter in the Voice Chat Device Settings dialog
does not respond to audio input.
-* The Input/Output options in the Voice Chat Device Settings dialog
- do not list all of the available audio devices, so only the 'default'
- device may be selected.
-
TROUBLESHOOTING
-=-=-=-=-=-=-=-
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 48b8ea8c60..69e08db2bf 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -2286,10 +2286,19 @@ void LLVoiceClient::tuningSetMicVolume(float volume)
void LLVoiceClient::tuningSetSpeakerVolume(float volume)
{
- int scaledVolume = ((int)(volume * 100.0f)) - 100;
+ // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default.
+ // Map it as follows: 0.0 -> -100, 0.5 -> 24, 1.0 -> 50
+
+ volume -= 0.5f; // offset volume to the range [-0.5 ... 0.5], with 0 at the default.
+ int scaledVolume = 24; // offset scaledVolume by its default level
+ if(volume < 0.0f)
+ scaledVolume += ((int)(volume * 248.0f)); // (24 - (-100)) * 2
+ else
+ scaledVolume += ((int)(volume * 52.0f)); // (50 - 24) * 2
+
if(scaledVolume != mTuningSpeakerVolume)
{
- mTuningSpeakerVolume = ((int)(volume * 100.0f)) - 100;
+ mTuningSpeakerVolume = scaledVolume;
mTuningSpeakerVolumeDirty = true;
}
}
@@ -3690,7 +3699,18 @@ void LLVoiceClient::setEarLocation(S32 loc)
void LLVoiceClient::setVoiceVolume(F32 volume)
{
- int scaledVolume = ((int)(volume * 100.0f)) - 100;
+// llinfos << "volume is " << volume << llendl;
+
+ // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default.
+ // Map it as follows: 0.0 -> -100, 0.5 -> 24, 1.0 -> 50
+
+ volume -= 0.5f; // offset volume to the range [-0.5 ... 0.5], with 0 at the default.
+ int scaledVolume = 24; // offset scaledVolume by its default level
+ if(volume < 0.0f)
+ scaledVolume += ((int)(volume * 248.0f)); // (24 - (-100)) * 2
+ else
+ scaledVolume += ((int)(volume * 52.0f)); // (50 - 24) * 2
+
if(scaledVolume != mSpeakerVolume)
{
if((scaledVolume == -100) || (mSpeakerVolume == -100))