summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-02-03 13:56:39 +0800
committerangela <angela@lindenlab.com>2010-02-03 13:56:39 +0800
commit460ec67b97bc210c0a03483dd0b754e92fabe806 (patch)
tree90bd49da9c7e23e6b90ebf04b8fcc9847b4f414e /indra/newview/llvoiceclient.cpp
parent1094fa28c618370af9a95cf823cbd9287c92dd24 (diff)
parent86923afd27d76734cf1274fa788928230c232a4d (diff)
resolve merge in llsidepanelinventory.cpp
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index c062dd1732..73e1b312fa 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -1258,7 +1258,6 @@ LLVoiceClient::LLVoiceClient() :
mEarLocation(0),
mSpeakerVolumeDirty(true),
mSpeakerMuteDirty(true),
- mSpeakerVolume(0),
mMicVolume(0),
mMicVolumeDirty(true),
@@ -1271,6 +1270,8 @@ LLVoiceClient::LLVoiceClient() :
mAPIVersion = LLTrans::getString("NotConnected");
+ mSpeakerVolume = scale_speaker_volume(0);
+
#if LL_DARWIN || LL_LINUX || LL_SOLARIS
// HACK: THIS DOES NOT BELONG HERE
// When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us.
@@ -3525,7 +3526,7 @@ void LLVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream)
if(mSpeakerMuteDirty)
{
- const char *muteval = ((mSpeakerVolume == 0)?"true":"false");
+ const char *muteval = ((mSpeakerVolume <= scale_speaker_volume(0))?"true":"false");
mSpeakerMuteDirty = false;
@@ -5981,7 +5982,7 @@ bool LLVoiceClient::voiceEnabled()
bool LLVoiceClient::voiceWorking()
{
- return (stateLoggedIn <= mState) && (mState <= stateLeavingSession);
+ return (stateLoggedIn <= mState) && (mState <= stateSessionTerminated);
}
void LLVoiceClient::setLipSyncEnabled(BOOL enabled)
@@ -6062,7 +6063,8 @@ void LLVoiceClient::setVoiceVolume(F32 volume)
if(scaled_volume != mSpeakerVolume)
{
- if((scaled_volume == 0) || (mSpeakerVolume == 0))
+ int min_volume = scale_speaker_volume(0);
+ if((scaled_volume == min_volume) || (mSpeakerVolume == min_volume))
{
mSpeakerMuteDirty = true;
}