From 9fc7c84f743a99ae32a2f28894df39c3ce2f0acb Mon Sep 17 00:00:00 2001 From: TighMacFanatic Date: Sat, 17 Aug 2013 12:20:03 -0400 Subject: [PATCH 1/2] Added a third option to hear voice from everywhere so position does not affect volume/panning. --- indra/newview/llvoicevivox.cpp | 59 ++++++++++--------- indra/newview/llvoicevivox.h | 1 + .../xui/en-us/panel_preferences_voice.xml | 5 +- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index e0cf09e26..a4713ef1b 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -2564,41 +2564,44 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) stream << ""; - 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 << "" diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 49b2132ac..c1efcc38d 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -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 }; diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml index c25f36291..479ed0b7d 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml @@ -4,10 +4,11 @@ - + Hear Voice Chat from camera position. Hear Voice Chat from avatar position. - + Hear Voice Chat equally from everyone. + Push To Talk Push-to-Talk trigger: From 7783b835f0e5bd117c20199973084c4c00796a2c Mon Sep 17 00:00:00 2001 From: TighMacFanatic Date: Sun, 18 Aug 2013 02:07:12 -0400 Subject: [PATCH 2/2] Fix swapped enum so I don't break anything unexpected. --- indra/newview/llvoicevivox.h | 4 ++-- .../skins/default/xui/en-us/panel_preferences_voice.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index c1efcc38d..329d7248f 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -786,8 +786,8 @@ 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 + earLocMixed, // ear at avatar location/camera direction + earLocSpeaker // eat at speaker, speakers not affected by position }; S32 mEarLocation; diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml index 479ed0b7d..fe49f379d 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml @@ -7,7 +7,7 @@ Hear Voice Chat from camera position. Hear Voice Chat from avatar position. - Hear Voice Chat equally from everyone. + Hear Voice Chat equally from everyone. Push To Talk