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 .
meow-7.2.2
Adam Moss 2008-02-26 18:28:52 +00:00
parent 03337b9142
commit 6027ad2630
2 changed files with 24 additions and 7 deletions

View File

@ -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
-=-=-=-=-=-=-=-

View File

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