Added a third option to hear voice from everywhere so position does not affect volume/panning.

This commit is contained in:
TighMacFanatic
2013-08-17 12:20:03 -04:00
parent c07646ff38
commit 9fc7c84f74
3 changed files with 35 additions and 30 deletions

View File

@@ -2564,41 +2564,44 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
stream << "<ListenerPosition>";
LLVector3d earPosition;
LLVector3 earVelocity;
LLMatrix3 earRot;
if (mEarLocation != earLocSpeaker)
{
LLVector3d earPosition;
LLVector3 earVelocity;
LLMatrix3 earRot;
switch(mEarLocation)
{
case earLocCamera:
default:
earPosition = mCameraPosition;
earVelocity = mCameraVelocity;
earRot = mCameraRot;
break;
switch(mEarLocation)
{
case earLocCamera:
default:
earPosition = mCameraPosition;
earVelocity = mCameraVelocity;
earRot = mCameraRot;
break;
case earLocAvatar:
earPosition = mAvatarPosition;
earVelocity = mAvatarVelocity;
earRot = mAvatarRot;
break;
case earLocAvatar:
earPosition = mAvatarPosition;
earVelocity = mAvatarVelocity;
earRot = mAvatarRot;
break;
case earLocMixed:
earPosition = mAvatarPosition;
earVelocity = mAvatarVelocity;
earRot = mCameraRot;
break;
}
case earLocMixed:
earPosition = mAvatarPosition;
earVelocity = mAvatarVelocity;
earRot = mCameraRot;
break;
}
l = earRot.getLeftRow();
u = earRot.getUpRow();
a = earRot.getFwdRow();
pos = earPosition;
vel = earVelocity;
l = earRot.getLeftRow();
u = earRot.getUpRow();
a = earRot.getFwdRow();
pos = earPosition;
vel = earVelocity;
// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL;
oldSDKTransform(l, u, a, pos, vel);
oldSDKTransform(l, u, a, pos, vel);
}
stream
<< "<Position>"

View File

@@ -786,6 +786,7 @@ private:
{
earLocCamera = 0, // ear at camera
earLocAvatar, // ear at avatar
earLocSpeaker, // eat at speaker, speakers not affected by position
earLocMixed // ear at avatar location/camera direction
};

View File

@@ -4,10 +4,11 @@
<check_box bottom_delta="0" follows="top" height="16" initial_value="false" label="Enable voice chat" left="8" name="enable_voice_check"/>
<check_box bottom_delta="-18" follows="top" height="16" name="enable_multivoice_check"/>
<string value="Allow multiple instances of [APP_NAME] to use voice simultaneously (requires restart)" name="multivoice_label"/>
<radio_group bottom_delta="-46" draw_border="false" follows="top" height="40" left_delta="20" name="ear_location" width="364">
<radio_group bottom_delta="-66" draw_border="false" follows="top" height="60" left_delta="20" name="ear_location" width="364">
<radio_item bottom="-19" height="16" left="3" name="0">Hear Voice Chat from camera position.</radio_item>
<radio_item bottom="-35" height="16" name="1">Hear Voice Chat from avatar position.</radio_item>
</radio_group>
<radio_item bottom="-51" height="16" name="2">Hear Voice Chat equally from everyone.</radio_item>
</radio_group>
<text bottom_delta="-20" follows="top" height="16" name="push_to_talk_heading">Push To Talk</text>
<check_box bottom_delta="-20" follows="top" height="16" initial_value="false" label="Use Push-to-Talk in toggle mode" name="push_to_talk_toggle_check" tool_tip="When enabled, press the push-to-talk trigger to switch your microphone on and off. When disabled, the microphone is off unless the trigger is being held down."/>
<text bottom_delta="-20" follows="top" height="16" left_delta="4" name="push_to_talk_label">Push-to-Talk trigger:</text>