diff options
author | Adam Moss <moss@lindenlab.com> | 2008-02-26 18:28:52 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2008-02-26 18:28:52 +0000 |
commit | 6027ad2630b8650cabcf00628ee9b0d25bedd67f (patch) | |
tree | ac3725af83ec4b998d13b0f7e5698412fd297032 /indra/newview | |
parent | 03337b9142305a8d0b8744505c498ae19dd4c9a2 (diff) |
QAR-279 Improved Voice volume management & Linux Voice
Featuring:
DEV-9505 Working device enumeration A.K.A. USB headset support
DEV-9727 Linux Voice quality issues in 1.19.0
DEV-10802 Change the way local output volume is handled
And Vivox SDK updates all-round.
svn merge -c80652 svn+ssh://svn.lindenlab.com/svn/linden/qa/qar-279 .
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/linux_tools/client-readme-voice.txt | 5 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 26 |
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)) |