Merge branch 'DRTVWR-588-maint-W' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/newview/llappviewer.cpp
#	indra/newview/llstatusbar.h
#	indra/newview/llvoavatar.cpp
#	indra/newview/llvoicevivox.cpp
#	indra/newview/skins/default/xui/en/panel_sound_devices.xml
#	indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
meow-7.2.2
Ansariel 2023-08-04 18:54:46 +02:00
commit 98f314787d
27 changed files with 232 additions and 177 deletions

View File

@ -24657,17 +24657,6 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceMultiInstance</key>
<map>
<key>Comment</key>
<string>Enables using voice in multiple simultaneous viewer instances</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>FSSoundCacheLocation</key>
<map>
<key>Comment</key>

View File

@ -3473,20 +3473,19 @@ bool LLAppViewer::initConfiguration()
return false;
}
if (mSecondInstance)
{
// This is the second instance of SL. Turn off voice support,
// but make sure the setting is *not* persisted.
LLControlVariable* disable_voice = gSavedSettings.getControl("CmdLineDisableVoice");
// <FS:Ansariel> Voice in multiple instances; by Latif Khalifa
//if(disable_voice)
if(disable_voice && !gSavedSettings.getBOOL("VoiceMultiInstance"))
// </FS:Ansariel>
{
const BOOL DO_NOT_PERSIST = FALSE;
disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST);
}
}
// <FS:Ansariel> Voice in multiple instances
//if (mSecondInstance)
//{
// // This is the second instance of SL. Mute voice,
// // but make sure the setting is *not* persisted.
// LLControlVariable* enable_voice = gSavedSettings.getControl("EnableVoiceChat");
// if(enable_voice)
// {
// const BOOL DO_NOT_PERSIST = FALSE;
// enable_voice->setValue(LLSD(FALSE), DO_NOT_PERSIST);
// }
//}
// </FS:Ansariel>
gLastRunVersion = gSavedSettings.getString("LastRunVersion");

View File

@ -908,6 +908,15 @@ void LLHUDNameTag::shift(const LLVector3& offset)
mPositionAgent += offset;
}
F32 LLHUDNameTag::getWorldHeight() const
{
const LLViewerCamera* camera = LLViewerCamera::getInstance();
F32 height_meters = mLastDistance * (F32)tan(camera->getView() / 2.f);
F32 height_pixels = camera->getViewHeightInPixels() / 2.f;
F32 meters_per_pixel = height_meters / height_pixels;
return mHeight * meters_per_pixel * gViewerWindow->getDisplayScale().mV[VY];
}
//static
void LLHUDNameTag::addPickable(std::set<LLViewerObject*> &pick_list)
{

View File

@ -127,11 +127,12 @@ public:
/*virtual*/ void markDead();
friend class LLHUDObject;
/*virtual*/ F32 getDistance() const { return mLastDistance; }
S32 getLOD() { return mLOD; }
BOOL getVisible() { return mVisible; }
S32 getLOD() const { return mLOD; }
BOOL getVisible() const { return mVisible; }
BOOL getHidden() const { return mHidden; }
void setHidden( BOOL hide ) { mHidden = hide; }
void shift(const LLVector3& offset);
F32 getWorldHeight() const;
BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render = FALSE);

View File

@ -70,11 +70,14 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
mRetryBtn = getChild<LLButton>("retry_btn");
mCtrlInputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this));
mCtrlOutputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this));
mRetryBtn->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitRetry, this));
mLocalizedDeviceNames[DEFAULT_DEVICE] = getString("default_text");
mLocalizedDeviceNames["No Device"] = getString("name_no_device");
@ -108,11 +111,25 @@ void LLPanelVoiceDeviceSettings::draw()
// let user know that volume indicator is not yet available
bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode();
getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled();
if (voice_enabled)
{
getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode);
getChildView("muted_text")->setVisible(FALSE);
mRetryBtn->setVisible(FALSE);
}
else
{
getChildView("wait_text")->setVisible(FALSE);
getChildView("muted_text")->setVisible(TRUE);
static LLCachedControl<bool> voice_enabled(gSavedSettings, "EnableVoiceChat");
mRetryBtn->setVisible(!voice_enabled || LLVoiceClient::isMutedVoiceInstance());
}
LLPanel::draw();
if (is_in_tuning_mode)
if (is_in_tuning_mode && voice_enabled)
{
const S32 num_bars = 5;
F32 voice_power = LLVoiceClient::getInstance()->tuningGetEnergy() / LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
@ -339,3 +356,9 @@ void LLPanelVoiceDeviceSettings::onInputDevicesClicked()
{
LLVoiceClient::getInstance()->refreshDeviceLists(false); // fill in the pop up menus again if needed.
}
void LLPanelVoiceDeviceSettings::onCommitRetry()
{
gSavedSettings.setBOOL("EnableVoiceChat", TRUE);
LLVoiceClient::unmuteVoiceInstance();
}

View File

@ -55,12 +55,14 @@ protected:
void onCommitOutputDevice();
void onOutputDevicesClicked();
void onInputDevicesClicked();
void onCommitRetry();
F32 mMicVolume;
std::string mInputDevice;
std::string mOutputDevice;
class LLComboBox *mCtrlInputDevices;
class LLComboBox *mCtrlOutputDevices;
class LLButton *mRetryBtn;
BOOL mDevicesUpdated;
bool mUseTuningMode;
std::map<std::string, std::string> mLocalizedDeviceNames;

View File

@ -40,6 +40,7 @@
#include "llfloaterreg.h"
#include "llfloaterpreference.h"
#include "llsliderctrl.h"
#include "llvoicevivox.h"
#include "llcheckboxctrl.h"
#include "llviewercontrol.h"
@ -54,7 +55,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown()
/*//<FS:KC> Handled centrally now
mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2));
mCommitCallbackRegistrar.add("Vol.SetSounds", boost::bind(&LLPanelVolumePulldown::onClickSetSounds, this));
mCommitCallbackRegistrar.add("Vol.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelVolumePulldown::updateMediaAutoPlayCheckbox, this, _1));
mCommitCallbackRegistrar.add("Vol.updateCheckbox", boost::bind(&LLPanelVolumePulldown::updateCheckbox, this, _1, _2));
mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2));
*/
@ -107,19 +108,27 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data)
control->set(LLSD(FALSE));
}
void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
void LLPanelVolumePulldown::updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data)
{
std::string name = ctrl->getName();
std::string control_name = user_data.asString();
if (control_name == "MediaAutoPlay")
{
std::string name = ctrl->getName();
// Disable "Allow Media to auto play" only when both
// "Streaming Music" and "Media" are unchecked. STORM-513.
if ((name == "enable_music") || (name == "enable_media"))
{
bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
// Disable "Allow Media to auto play" only when both
// "Streaming Music" and "Media" are unchecked. STORM-513.
if ((name == "enable_music") || (name == "enable_media"))
{
bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled);
}
getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled);
}
}
else if (control_name == "VoiceChat")
{
LLVivoxVoiceClient::unmuteVoiceInstance();
}
}
void LLPanelVolumePulldown::onClickSetSounds()

View File

@ -44,7 +44,7 @@ class LLPanelVolumePulldown : public LLPanelPulldown
void onClickSetSounds();
// Disables "Allow Media to auto play" check box only when both
// "Streaming Music" and "Media" are unchecked. Otherwise enables it.
void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl);
void updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data);
void onAdvancedButtonClick(const LLSD& user_data);
*/

View File

@ -67,6 +67,7 @@
#include "llviewermenu.h" // for gMenuBarView
#include "llviewerparcelmgr.h"
#include "llviewerthrottle.h"
#include "llvoiceclient.h"
#include "lluictrlfactory.h"
#include "lltoolmgr.h"
@ -350,6 +351,16 @@ BOOL LLStatusBar::postBuild()
LLHints::getInstance()->registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle());
gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));
gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLStatusBar::onVoiceChanged, this, _2));
if (gSavedSettings.getBOOL("EnableVoiceChat") && !LLVoiceClient::isMutedVoiceInstance())
{
mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off"));
}
else
{
mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off"));
}
// <FS:Ansariel> FIRE-19697: Add setting to disable graphics preset menu popup on mouse over
gSavedSettings.getControl("FSStatusBarMenuButtonPopupOnRollover")->getSignal()->connect(boost::bind(&LLStatusBar::onPopupRolloverChanged, this, _2));
@ -1125,6 +1136,19 @@ void LLStatusBar::onVolumeChanged(const LLSD& newvalue)
refresh();
}
void LLStatusBar::onVoiceChanged(const LLSD& newvalue)
{
if (newvalue.asBoolean() && !LLVoiceClient::isMutedVoiceInstance())
{
mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off"));
}
else
{
mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off"));
}
refresh();
}
void LLStatusBar::onUpdateFilterTerm()
{
LLWString searchValue = utf8str_to_wstring( mFilterEdit->getValue() );

View File

@ -164,13 +164,12 @@ private:
void onClickBuyCurrency();
void onVolumeChanged(const LLSD& newvalue);
void onVoiceChanged(const LLSD& newvalue);
void onMouseEnterPresetsCamera();
void onMouseEnterPresets();
void onMouseEnterVolume();
void onMouseEnterNearbyMedia();
// <FS:Ansariel> Does not exist 15-02-2021
//void onClickScreen(S32 x, S32 y);
static void onClickStreamToggle(void* data); // <FS:Zi> Media/Stream separation
static void onClickMediaToggle(void* data);

View File

@ -253,7 +253,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
try
{
res = this->parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg);
res = parseResponse(httpResults, parseResult, body, translation, detected_lang, err_msg);
}
catch (std::out_of_range&)
{
@ -293,8 +293,6 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
if (!failure.empty())
failure(status, err_msg);
}
}
//=========================================================================
@ -353,7 +351,6 @@ private:
std::string& translation,
std::string& detected_lang);
static std::string getAPIKey();
};
//-------------------------------------------------------------------------
@ -391,36 +388,37 @@ bool LLGoogleTranslationHandler::checkVerificationResponse(
// virtual
bool LLGoogleTranslationHandler::parseResponse(
const LLSD& http_response,
const LLSD& http_response,
int& status,
const std::string& body,
std::string& translation,
std::string& detected_lang,
std::string& err_msg) const
{
const std::string& text = !body.empty() ? body : http_response["error_body"].asStringRef();
Json::Value root;
Json::Reader reader;
if (!reader.parse(body, root))
if (reader.parse(text, root))
{
if (root.isObject())
{
// Request succeeded, extract translation from the XML body.
if (parseTranslation(root, translation, detected_lang))
return true;
// Request failed. Extract error message from the XML body.
parseErrorResponse(root, status, err_msg);
}
}
else
{
// XML parsing failed. Extract error message from the XML parser.
err_msg = reader.getFormatedErrorMessages();
return false;
}
if (!root.isObject()) // empty response? should not happen
{
return false;
}
if (status != HTTP_OK)
{
// Request failed. Extract error message from the response.
parseErrorResponse(root, status, err_msg);
return false;
}
// Request succeeded, extract translation from the response.
return parseTranslation(root, translation, detected_lang);
return false;
}
// virtual
@ -493,7 +491,7 @@ void LLGoogleTranslationHandler::verifyKey(const LLSD &key, LLTranslate::KeyVeri
/*virtual*/
void LLGoogleTranslationHandler::initHttpHeader(LLCore::HttpHeaders::ptr_t headers, const std::string& user_agent) const
{
headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_JSON);
headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
}
@ -503,8 +501,7 @@ void LLGoogleTranslationHandler::initHttpHeader(
const std::string& user_agent,
const LLSD &key) const
{
headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_TEXT_PLAIN);
headers->append(HTTP_OUT_HEADER_USER_AGENT, user_agent);
initHttpHeader(headers, user_agent);
}
LLSD LLGoogleTranslationHandler::sendMessageAndSuspend(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter,
@ -1314,5 +1311,4 @@ LLTranslationAPIHandler& LLTranslate::getHandler(EService service)
}
return azure;
}

View File

@ -4192,6 +4192,25 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
name_position[VZ] += fsNameTagOffset / 10.f;
// </FS:Ansariel>
const F32 water_height = getRegion()->getWaterHeight();
static const F32 WATER_HEIGHT_DELTA = 0.25f;
if (name_position[VZ] < water_height + WATER_HEIGHT_DELTA)
{
if (LLViewerCamera::getInstance()->getOrigin()[VZ] >= water_height)
{
name_position[VZ] = water_height;
}
else // both camera and HUD are below watermark
{
F32 name_world_height = mNameText->getWorldHeight();
F32 max_z_position = water_height - name_world_height;
if (name_position[VZ] > max_z_position)
{
name_position[VZ] = max_z_position;
}
}
}
mNameText->setPositionAgent(name_position);
}

View File

@ -571,6 +571,16 @@ void LLVoiceClient::setVoiceEnabled(bool enabled)
}
}
void LLVoiceClient::unmuteVoiceInstance()
{
LLVivoxVoiceClient::unmuteVoiceInstance();
}
bool LLVoiceClient::isMutedVoiceInstance()
{
return LLVivoxVoiceClient::isMutedVoiceInstance();
}
void LLVoiceClient::updateMicMuteLogic()
{
// If not configured to use PTT, the mic should be open (otherwise the user will be unable to speak).

View File

@ -432,6 +432,8 @@ public:
void toggleUserPTTState(void);
void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs
void setVoiceEnabled(bool enabled);
static void unmuteVoiceInstance();
static bool isMutedVoiceInstance();
void setUsePTT(bool usePTT);
void setPTTIsToggle(bool PTTIsToggle);

View File

@ -277,6 +277,7 @@ static void killGateway()
bool LLVivoxVoiceClient::sShuttingDown = false;
bool LLVivoxVoiceClient::sConnected = false;
bool LLVivoxVoiceClient::sVoiceInstanceMuted = false;
LLPumpIO *LLVivoxVoiceClient::sPump = nullptr;
LLVivoxVoiceClient::LLVivoxVoiceClient() :
@ -355,6 +356,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
sShuttingDown = false;
sConnected = false;
sPump = nullptr;
sVoiceInstanceMuted = LLAppViewer::instance()->isSecondInstance();
mSpeakerVolume = scale_speaker_volume(0);
@ -595,9 +597,6 @@ void LLVivoxVoiceClient::connectorCreate()
<< "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>"
<< "<Mode>Normal</Mode>"
<< strConnectorHandle
// <FS:Ansariel> Voice in multiple instances; by Latif Khalifa
<< (gSavedSettings.getBOOL("VoiceMultiInstance") ? "<MinimumPort>30000</MinimumPort><MaximumPort>50000</MaximumPort>" : "")
// </FS:Ansariel>
<< "<Logging>"
<< "<Folder>" << logdir << "</Folder>"
<< "<FileNamePrefix>Connector</FileNamePrefix>"
@ -1039,30 +1038,44 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
// cause SLVoice's bind() call to fail with EADDRINUSE. We expect
// that eventually the OS will time out previous ports, which is
// why we cycle instead of incrementing indefinitely.
// <FS:Ansariel> Unfail voice connection failures
//U32 portbase = gSavedSettings.getU32("VivoxVoicePort");
//static U32 portoffset = 0;
//static const U32 portrange = 100;
//std::string host(gSavedSettings.getString("VivoxVoiceHost"));
//U32 port = portbase + portoffset;
//portoffset = (portoffset + 1) % portrange;
//params.args.add("-i");
//params.args.add(STRINGIZE(host << ':' << port));
// </FS:Ansariel>
std::string loglevel = gSavedSettings.getString("VivoxDebugLevel");
if (loglevel.empty())
{
loglevel = "0";
}
params.args.add("-ll");
params.args.add(loglevel);
static LLCachedControl<U32> portbase(gSavedSettings, "VivoxVoicePort");
static LLCachedControl<std::string> host(gSavedSettings, "VivoxVoiceHost");
static LLCachedControl<std::string> loglevel(gSavedSettings, "VivoxDebugLevel");
// <FS:Ansariel> Strip trailing directory delimiter
//static LLCachedControl<std::string> log_folder(gSavedSettings, "VivoxLogDirectory");
std::string log_folder = gSavedSettings.getString("VivoxLogDirectory");
// </FS:Ansariel>
static LLCachedControl<std::string> shutdown_timeout(gSavedSettings, "VivoxShutdownTimeout");
static const U32 portrange = 100;
static U32 portoffset = 0;
U32 port = 0;
if (log_folder.empty())
if (LLAppViewer::instance()->isSecondInstance())
{
log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
// Ideally need to know amount of instances and
// to increment instance_offset on EADDRINUSE.
// But for now just use rand
static U32 instance_offset = portrange * ll_rand(20);
port = portbase + portoffset + portrange;
}
else
{
// leave main thread with exclusive port set
port = portbase + portoffset;
}
portoffset = (portoffset + 1) % portrange;
params.args.add("-i");
params.args.add(STRINGIZE(host() << ':' << port));
params.args.add("-ll");
if (loglevel().empty())
{
params.args.add("0");
}
else
{
params.args.add(loglevel);
}
// <FS:Ansariel> Strip trailing directory delimiter
@ -1072,7 +1085,17 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
}
// </FS:Ansariel>
params.args.add("-lf");
params.args.add(log_folder);
// <FS:Ansariel> Strip trailing directory delimiter
//if (log_folder().empty())
if (log_folder.empty())
// </FS:Ansariel>
{
params.args.add(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""));
}
else
{
params.args.add(log_folder);
}
// set log file basename and .log
params.args.add("-lp");
@ -1088,27 +1111,11 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
LLFile::rename(new_log, old_log);
}
std::string shutdown_timeout = gSavedSettings.getString("VivoxShutdownTimeout");
if (!shutdown_timeout.empty())
if (!shutdown_timeout().empty())
{
params.args.add("-st");
params.args.add(shutdown_timeout);
}
// <FS:Ansariel> Voice in multiple instances; by Latif Khalifa
if (gSavedSettings.getBOOL("VoiceMultiInstance"))
{
S32 port_nr = 30000 + ll_rand(20000);
LLControlVariable* voice_port = gSavedSettings.getControl("VivoxVoicePort");
if (voice_port)
{
voice_port->setValue(LLSD(port_nr), false);
params.args.add("-i");
params.args.add(llformat("127.0.0.1:%u", gSavedSettings.getU32("VivoxVoicePort")));
}
}
// </FS:Ansariel>
params.cwd = gDirUtilp->getAppRODataDir();
// <FS:ND> Check if using the old SLVoice for Linux. the SDK in that version is too old to handle the extra args
@ -1130,9 +1137,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
sGatewayPtr = LLProcess::create(params);
// <FS:Ansariel> Unfail voice connection failures
//mDaemonHost = LLHost(host.c_str(), port);
mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort"));
mDaemonHost = LLHost(host().c_str(), port);
}
else
{
@ -5789,14 +5794,15 @@ bool LLVivoxVoiceClient::voiceEnabled(bool no_cache)
// <FS:Ansariel> Replace frequently called gSavedSettings
//return gSavedSettings.getBOOL("EnableVoiceChat") &&
// !gSavedSettings.getBOOL("CmdLineDisableVoice") &&
// !gNonInteractive;
// !gNonInteractive &&
// !sVoiceInstanceMuted;
if (no_cache)
{
return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice") && !gNonInteractive;
return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice") && !gNonInteractive && !sVoiceInstanceMuted;
}
static LLCachedControl<bool> sEnableVoiceChat(gSavedSettings, "EnableVoiceChat");
static LLCachedControl<bool> sCmdLineDisableVoice(gSavedSettings, "CmdLineDisableVoice");
return sEnableVoiceChat && !sCmdLineDisableVoice && !gNonInteractive;
return sEnableVoiceChat && !sCmdLineDisableVoice && !gNonInteractive && !sVoiceInstanceMuted;
// </FS:Ansariel>
}
// </FS:Ansariel>

View File

@ -175,6 +175,8 @@ public:
virtual bool voiceEnabled(bool no_cache = false);
// </FS:Ansariel>
virtual void setVoiceEnabled(bool enabled);
static void unmuteVoiceInstance() { sVoiceInstanceMuted = false; }
static bool isMutedVoiceInstance() { return sVoiceInstanceMuted; }
virtual BOOL lipSyncEnabled();
virtual void setLipSyncEnabled(BOOL enabled);
virtual void setMuteMic(bool muted); // Set the mute state of the local mic.
@ -931,6 +933,7 @@ private:
// This variables can last longer than vivox in coroutines so we need them as static
static bool sShuttingDown;
static bool sConnected;
static bool sVoiceInstanceMuted; // Second+ instance of viewer starts muted
static LLPumpIO* sPump;
LLEventMailDrop mVivoxPump;

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

View File

@ -66,6 +66,7 @@ with the same filename but different name
<texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" />
<texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" />
<texture name="VoiceMute_Off" file_name="icons/VoiceMute_Off.png" preload="false" />
<texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" />
<texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" />

View File

@ -98,7 +98,6 @@ Avtomatik oxutma
<panel label="Səs seçimləri" name="Media Voice tab">
<check_box label="Səsi aktivləşdir" name="enable_voice_check" width="155"/>
<button tool_tip="Səsi yenilə" name="reset_voice_button"/>
<check_box label="Eyni anda birdən çox klientdə səs istifadəsinə icazə verin" name="VoiceMultiInstance" />
<radio_group name="ear_location">
<radio_item label="Kameraların mövqeyindən səsi eşitmək" name="0"/>
<radio_item label="Avatarın mövqeyindən səsi eşitmək" name="1"/>

View File

@ -119,7 +119,6 @@
<panel label="Voice-Chat" name="Media Voice tab">
<check_box label="Voice-Chat aktivieren" name="enable_voice_check" width="140"/>
<button name="reset_voice_button" tool_tip="Voice-Chat zurücksetzen"/>
<check_box label="Voice-Chat in mehreren Viewer-Instanzen gleichzeitig erlauben" name="VoiceMultiInstance"/>
<radio_group name="ear_location">
<radio_item label="Voice-Chat von Kameraposition aus hören" name="0"/>
<radio_item label="Voice-Chat von Avatarposition aus hören" name="1"/>

View File

@ -924,53 +924,6 @@
<button.commit_callback
function="Pref.ResetVoice" />
</button>
<check_box
follows="left|top"
height="16"
control_name="VoiceMultiInstance"
disabled_control="CmdLineDisableVoice"
label="Allow Voice in multiple viewer instances simultaneously"
layout="topleft"
top_pad="3"
left="25"
name="VoiceMultiInstance"
width="400"/>
<!--
<text
type="string"
length="1"
follows="left|top"
layout="topleft"
left="25"
top_pad="5"
name="Listen from"
width="112">
Listen from:
</text>
<icon
follows="left|top"
height="18"
image_name="Cam_FreeCam_Off"
layout="topleft"
name="camera_icon"
mouse_opaque="false"
visible="true"
width="18"
left_pad="-4"
top_delta="-5"/>
<icon
follows="left|top"
height="18"
image_name="Move_Walk_Off"
layout="topleft"
left_pad="170"
name="avatar_icon"
mouse_opaque="false"
visible="true"
width="18"
top_delta="0" />
-->
<radio_group
enabled_control="EnableVoiceChat"
control_name="VoiceEarLocation"

View File

@ -126,7 +126,7 @@
layout="topleft"
left_pad="5"
name="wait_text"
top_delta="-1"
top_delta="2"
width="110">
Please wait
</text>
@ -136,7 +136,7 @@
layout="topleft"
left_delta="0"
name="bar0"
top_delta="-2"
top_delta="-5"
width="20" />
<locate
follows="right|top"
@ -170,4 +170,26 @@
name="bar4"
top_delta="0"
width="20" />
</panel>
<text
type="string"
name="muted_text"
text_color="EmphasisColor"
length="1"
follows="right|top"
height="18"
layout="topleft"
left_delta="-100"
top_delta="5"
width="70">
Muted
</text>
<button
follows="right|top"
height="23"
image_overlay="Refresh_Off"
layout="topleft"
left_pad="1"
name="retry_btn"
top_delta="-5"
width="23" />
</panel>

View File

@ -72,7 +72,6 @@
<panel label="Chat vocal" name="Media Voice tab">
<check_box label="Activer le chat vocal" name="enable_voice_check" width="150"/>
<button tool_tip="Réinitialiser les paramètres" name="reset_voice_button"/>
<check_box label="Autoriser le chat vocal lorsque plusieurs instances de [APP_NAME] sont exécutées" name="VoiceMultiInstance"/>
<radio_group name="ear_location">
<radio_item label="Entendre à partir de la position de la caméra" name="0"/>
<radio_item label="Entendre à partir de la position de l'avatar" name="1"/>

View File

@ -103,7 +103,6 @@
<panel label="Voce" name="Media Voice tab">
<check_box label="Abilita voce" name="enable_voice_check"/>
<button tool_tip="Ripristina voce" name="reset_voice_button"/>
<check_box label="Abilita voce in più viewer contemporaneamente" name="VoiceMultiInstance"/>
<radio_group name="ear_location">
<radio_item label="Ascolta voce da posizione camera" name="0"/>
<radio_item label="Ascolta voce da posizione avatar" name="1"/>

View File

@ -122,12 +122,6 @@
<panel label="ボイス" name="Media Voice tab" >
<check_box label="ボイスチャットを有効にする" name="enable_voice_check" width="155"/>
<check_box label="複数のビューワインスタンスで同時にボイスを有効にする" name="VoiceMultiInstance" />
<!--
<text name="Listen from">
方向:
</text>
-->
<radio_group name="ear_location">
<radio_item label="カメラの位置から聞く" name="0"/>
<radio_item label="アバターの位置から聞く" name="1"/>

View File

@ -110,7 +110,6 @@
<panel label="Głos" name="Media Voice tab">
<check_box label="Włącz rozmowy głosowe" name="enable_voice_check" width="155"/>
<button tool_tip="Resetuj rozmowy głosowe" name="reset_voice_button"/>
<check_box label="Gdy działa kilka kopii przeglądarki na raz, to zezwól na rozmowy głosowe w każdej z nich" name="VoiceMultiInstance" />
<radio_group name="ear_location">
<radio_item label="Odtwarzaj głos z pozycji kamery" name="0"/>
<radio_item label="Odtwarzaj głos z pozycji mojego awatara" name="1"/>

View File

@ -105,7 +105,6 @@
<panel label="Настройки голоса" name="Media Voice tab">
<check_box label="Включить голос" name="enable_voice_check" width="155"/>
<button tool_tip="Сброс голоса" name="reset_voice_button"/>
<check_box label="Разрешить голос в нескольких клиентах одновременно" name="VoiceMultiInstance" />
<radio_group name="ear_location">
<radio_item label="Слышать голос из положения камеры" name="0"/>
<radio_item label="Слышать голос из положения аватара" name="1"/>