From 28935a8b6435eaf41ab13605097257c9d7f5afda Mon Sep 17 00:00:00 2001
From: Callum Prentice <callum@lindenlab.com>
Date: Tue, 20 Apr 2021 16:28:58 -0700
Subject: Move location where we call function to setup VAD but didn't help

---
 indra/newview/llvoicevivox.cpp | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 39d6868b5c..fa4504de62 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -683,7 +683,14 @@ void LLVivoxVoiceClient::voiceControlCoro()
         bool success = startAndConnectSession();
         if (success)
         {
-            if (mTuningMode)
+			// disable the automatic VAD and explicitly set the VAD variables ourselves
+			// see SL-15072 for more details
+			unsigned int vad_hangover = 2001;
+			unsigned int vad_noise_floor = 577;
+			unsigned int vad_sensitivity = 44;
+			setupVADParams(vad_hangover, vad_noise_floor, vad_sensitivity);
+			
+			if (mTuningMode)
             {
                 performMicTuning();
             }
@@ -1883,13 +1890,6 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
     notifyParticipantObservers();
     notifyVoiceFontObservers();
 
-	// disable the automatic VAD and explicitly set the VAD variables ourselves
-	// see SL-15072 for more details
-	unsigned int vad_hangover = 2001;
-	unsigned int vad_noise_floor = 577;
-	unsigned int vad_sensitivity = 44;
-	setupVADParams(vad_hangover, vad_noise_floor, vad_sensitivity);
-
     LLSD timeoutEvent(LLSDMap("timeout", LLSD::Boolean(true)));
 
     mIsInChannel = true;
@@ -7628,11 +7628,13 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
 		}
 		else if (!stricmp(actionCstr, "Aux.SetVadProperties.1"))
 		{
-			std::cout << "@@@----" << std::endl;
+			// temporary for debugging- will eventually remove entirely or replace with a 
+			// toast message to alert the user that it was set
+			std::cout << "@@@" << std::endl;
 			std::cout << "    Response for Aux.SetVadProperties.1 was" << std::endl;
-			std::cout << "      statusCode: " << statusCode << std::endl;
-			std::cout << "    statusString: " << statusString << std::endl;
-			std::cout << "----@@@" << std::endl;
+			std::cout << "          statusCode: " << statusCode << std::endl;
+			std::cout << "        statusString: " << statusString << std::endl;
+			std::cout << "@@@" << std::endl;
 		}
 		/*
 		 else if (!stricmp(actionCstr, "Account.ChannelGetList.1"))
-- 
cgit v1.2.3