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


C++ AUD_Handle类代码示例

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


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

示例1: AUD_openMixdownDevice

AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start)
{
	try
	{
		ReadDevice* device = new ReadDevice(convCToDSpec(specs));
		device->setQuality(true);
		device->setVolume(volume);

		Sequence* f = dynamic_cast<Sequence*>(sequencer->get());

		f->setSpecs(convCToSpec(specs.specs));

		AUD_Handle handle = device->play(f->createQualityReader());
		if(handle.get())
		{
			handle->seek(start);
		}

		return new AUD_Device(device);
	}
	catch(Exception&)
	{
		return nullptr;
	}
}
开发者ID:audaspace,项目名称:audaspace,代码行数:25,代码来源:AUD_Special.cpp

示例2: AUD_play

AUD_Handle* AUD_play(AUD_Sound* sound, int keep)
{
	assert(sound);
	try
	{
		AUD_Handle handle = AUD_device->play(*sound, keep);
		if(!handle.isNull())
			return new AUD_Handle(handle);
	}
	catch(AUD_Exception&)
	{
	}
	return NULL;
}
开发者ID:HVisionSensing,项目名称:blendocv,代码行数:14,代码来源:AUD_C-API.cpp

示例3: assert

AUD_Handle *AUD_Device_play(AUD_Device* device, AUD_Sound *sound, int keep)
{
	assert(sound);
	try {
		AUD_Handle handle = AUD_device->play(*sound, keep);
		if (handle.get()) {
			return new AUD_Handle(handle);
		}
	}
	catch(AUD_Exception&)
	{
	}
	return NULL;
}
开发者ID:eirikhex,项目名称:blender,代码行数:14,代码来源:AUD_C-API.cpp

示例4: assert

AUD_Handle *AUD_playDevice(AUD_Device *device, AUD_Sound *sound, float seek)
{
	assert(device);
	assert(sound);

	try {
		AUD_Handle handle = (*device)->play(*sound);
		if (handle.get()) {
			handle->seek(seek);
			return new AUD_Handle(handle);
		}
	}
	catch(AUD_Exception&)
	{
	}
	return NULL;
}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:17,代码来源:AUD_C-API.cpp

示例5: AUD_Device_play

AUD_API AUD_Handle* AUD_Device_play(AUD_Device* device, AUD_Sound* sound, int keep)
{
	assert(sound);
	auto dev = device ? *device : DeviceManager::getDevice();

	try
	{
		AUD_Handle handle = dev->play(*sound, keep);
		if(handle.get())
		{
			return new AUD_Handle(handle);
		}
	}
	catch(Exception&)
	{
	}
	return nullptr;
}
开发者ID:carldong,项目名称:audaspace,代码行数:18,代码来源:AUD_Device.cpp

示例6: AUD_openMixdownDevice

AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start)
{
	try
	{
		AUD_ReadDevice* device = new AUD_ReadDevice(specs);
		device->setQuality(true);
		device->setVolume(volume);

		dynamic_cast<AUD_SequencerFactory*>(sequencer->get())->setSpecs(specs.specs);

		AUD_Handle handle = device->play(*sequencer);
		if(!handle.isNull())
			handle->seek(start);

		return new AUD_Device(device);
	}
	catch(AUD_Exception&)
	{
		return NULL;
	}
}
开发者ID:HVisionSensing,项目名称:blendocv,代码行数:21,代码来源:AUD_C-API.cpp


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