当前位置: 首页>>代码示例>>C++>>正文


C++ LLAudioSource::setAmbient方法代码示例

本文整理汇总了C++中LLAudioSource::setAmbient方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAudioSource::setAmbient方法的具体用法?C++ LLAudioSource::setAmbient怎么用?C++ LLAudioSource::setAmbient使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLAudioSource的用法示例。


在下文中一共展示了LLAudioSource::setAmbient方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: triggerSound

void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain,
								 const S32 type, const LLVector3d &pos_global)
{
	// Create a new source (since this can't be associated with an existing source.
	//llinfos << "Localized: " << audio_uuid << llendl;

	if (mMuted)
	{
		return;
	}

	LLUUID source_id;
	source_id.generate();

	LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type);
	gAudiop->addAudioSource(asp);
	if (pos_global.isExactlyZero())
	{
		asp->setAmbient(TRUE);
	}
	else
	{
		asp->setPositionGlobal(pos_global);
	}
	asp->updatePriority();
	asp->play(audio_uuid);
}
开发者ID:OS-Development,项目名称:VW.Meerkat,代码行数:27,代码来源:audioengine.cpp

示例2: triggerSound

void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain,
								 const S32 type, const LLVector3d &pos_global, const LLUUID& source_object)
{
	// Create a new source (since this can't be associated with an existing source.
	//LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL;

	// NaCl - Do not load silent sounds.
	if (mMuted || gain <FLT_EPSILON*2)
	{
		return;
	}

	LLUUID source_id;
	source_id.generate();

	LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type, source_object, true);
	addAudioSource(asp);
	if (pos_global.isExactlyZero())
	{
		asp->setAmbient(true);
	}
	else
	{
		asp->setPositionGlobal(pos_global);
	}
	asp->updatePriority();
	asp->play(audio_uuid);
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:28,代码来源:llaudioengine.cpp

示例3: triggerSound

void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain,
								 const S32 type, const LLVector3d &pos_global)
{
	// Create a new source (since this can't be associated with an existing source.
	//llinfos << "Localized: " << audio_uuid << llendl;

	if (mMuted || gain == 0.0)
	{
		return;
	}
	//fix collision sounds under OpenAL
	F32 fixedGain=llclamp(gain,0.0f,1.0f);
	if (fixedGain == 0.f) return;
	LLUUID source_id;
	source_id.generate();

	LLAudioSource *asp = new LLAudioSource(source_id, owner_id, fixedGain, type);
	gAudiop->addAudioSource(asp);
	if (pos_global.isExactlyZero())
	{
		asp->setAmbient(true);
	}
	else
	{
		asp->setPositionGlobal(pos_global);
	}
	asp->updatePriority();
	asp->play(audio_uuid);
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:29,代码来源:llaudioengine.cpp

示例4: triggerSound

void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain,
								 const S32 type, const LLVector3d &pos_global)
{
	// Create a new source (since this can't be associated with an existing source.
	//LL_INFOS("AudioEngine") << "Localized: " << audio_uuid << llendl;

	//If we cannot hear it, dont even try to load the sound.
	if (mMuted || gain == 0.0)
	{
		return;
	}

	LLUUID source_id;
	source_id.generate();

	LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type);
	gAudiop->addAudioSource(asp);
	if (pos_global.isExactlyZero())
	{
		asp->setAmbient(true);
	}
	else
	{
		asp->setPositionGlobal(pos_global);
	}
	asp->updatePriority();
	asp->play(audio_uuid);
}
开发者ID:ArminW,项目名称:imprudence,代码行数:28,代码来源:audioengine.cpp


注:本文中的LLAudioSource::setAmbient方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。