FIRE-17459 - Add unattenuated local voice support back on OpenSim

More details in Jira. Seems this functionality is not supported on later Vivox 4 versions. Still works on server 4.6 (opensim)
meow-7.2.2
Beq 2022-01-22 16:46:54 +00:00
parent 43944a6fbc
commit b3d297ca9b
4 changed files with 37 additions and 3 deletions

View File

@ -3139,6 +3139,16 @@ void LLFloaterPreference::updateUISoundsControls()
getChild<LLComboBox>("PlayModeUISndNewIncomingGroupIMSession")->setValue((int)gSavedSettings.getU32("PlayModeUISndNewIncomingGroupIMSession")); // 0, 1, 2, 3. Shared with Chat > Notifications > "When receiving Group Instant Messages"
getChild<LLComboBox>("PlayModeUISndNewIncomingConfIMSession")->setValue((int)gSavedSettings.getU32("PlayModeUISndNewIncomingConfIMSession")); // 0, 1, 2, 3. Shared with Chat > Notifications > "When receiving AdHoc Instant Messages"
#ifdef OPENSIM
auto earPosGroup = getChild<LLRadioGroup>("ear_location");
// <FS:Beq> OpenSim has option to not attenuate nearby local voice by distance
if(earPosGroup)
{
// It seems there is no better way to do this than with magic numbers short of importing the enums in vivoxvoice (which aren't necessarily the same thing).
// Index 2 here is the opensim only option to hear nearby chat without attenuation.
constexpr int hearNearbyVoiceFullVolume{2};
earPosGroup->setIndexEnabled(hearNearbyVoiceFullVolume,LLGridManager::instance().isInOpenSim());
}
// <FS:Beq>
getChild<LLTextBox>("textFSRestartOpenSim")->setVisible(TRUE);
getChild<LLLineEditor>("UISndRestartOpenSim")->setVisible(TRUE);
getChild<LLButton>("Prev_UISndRestartOpenSim")->setVisible(TRUE);

View File

@ -3373,17 +3373,31 @@ void LLVivoxVoiceClient::sendPositionAndVolumeUpdate(void)
earVelocity = mAvatarVelocity;
earRot = mCameraRot;
break;
// <FS:Beq> reimplement hear voice equally
case earLocSpeaker:
// we leave EarPos/Vel/Rot as empty
LL_DEBUGS("Voice") << "EarLoc Speaker in use" << LL_ENDL;
break;
// </FS:Beq>
}
// <FS:Beq> reimplement hear voice equally
if(mEarLocation != earLocSpeaker)
{
// for all spatial sources we need to do the transform
// </FS:Beq>
l = earRot.getLeftRow();
u = earRot.getUpRow();
a = earRot.getFwdRow();
pos = earPosition;
vel = earVelocity;
oldSDKTransform(l, u, a, pos, vel);
// <FS:Beq> reimplement hear voice equally
}
// </FS:Beq>
if (mHidden)
{

View File

@ -803,6 +803,7 @@ private:
{
earLocCamera = 0, // ear at camera
earLocAvatar, // ear at avatar
earLocSpeaker, // <FS:Beq> re-add equal voice based loosely on original patch from Tigh MacFanatic
earLocMixed // ear at avatar location/camera direction
};

View File

@ -939,7 +939,7 @@
layout="topleft"
left="25"
width="400"
height="40"
height="60"
top_pad="0"
name="ear_location">
<radio_item
@ -949,7 +949,7 @@
layout="topleft"
name="0"
width="150"/>
<radio_item
<radio_item
height="19"
follows="left|top"
label="Hear Voice from Avatar position"
@ -957,6 +957,15 @@
name="1"
top_pad="-2"
width="150" />
<radio_item
enabled="false"
height="19"
follows="left|top"
label="Hear Nearby Voices at full volume (Open Sim Only)"
layout="topleft"
name="2"
top_pad="-2"
width="150" />
</radio_group>
<check_box