Ejemplo n.º 1
0
void TorFlashLED::toggleIndicator()
{
  if (indicatorOn)
  {
    switchIndicator(minIndicator);
    indicatorOn = false;
  }
  else
  {
    switchIndicator(chosenIndicator);
    indicatorOn = true;
  }
}
void NearbyVoiceMonitor::draw()
{
	LLSpeakerMgr::speaker_list_t speaker_list;
	LLUUID id;
	BOOL draw=FALSE;

	id.setNull();
	mSpeakerMgr->update(TRUE);
	mSpeakerMgr->getSpeakerList(&speaker_list, FALSE);

	for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i)
	{
		LLPointer<LLSpeaker> s = *i;
		if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING)
		{
			draw=TRUE;
			id = s->mID;
			break;
		}
	}

	setSpeakerId(id);
	switchIndicator(true); // Ansa: Make sure the output monitor is visible at all times

	if(!mAutoHide || draw)
	{
		LLOutputMonitorCtrl::draw();
	}
}
void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/, bool show_other_participants_speaking /* = false */)
{
	if (speaker_id.isNull() && mSpeakerId.notNull())
	{
		LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
        switchIndicator(false);
        mSpeakerId = speaker_id;
	}

	if (speaker_id.isNull() || (speaker_id == mSpeakerId))
	{
		return;
	}

	if (mSpeakerId.notNull())
	{
		// Unregister previous registration to avoid crash. EXT-4782.
		LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
	}

	mShowParticipantsSpeaking = show_other_participants_speaking;
	mSpeakerId = speaker_id;
	LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this, session_id);

	//mute management
	if (mAutoUpdate)
	{
		if (speaker_id == gAgentID)
		{
			mIsMuted = false;
		}
		else
		{
			// check only blocking on voice. EXT-3542
			mIsMuted = LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat);
			LLMuteList::getInstance()->addObserver(this);
		}
	}
}
Ejemplo n.º 4
0
void TorFlashLED::turnIndicatorOff()
{
  switchIndicator(minIndicator);
  indicatorOn = false;
}
Ejemplo n.º 5
0
void TorFlashLED::turnIndicatorOn()
{
  switchIndicator(chosenIndicator);
  indicatorOn = true;
}