本文整理汇总了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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}