本文整理汇总了C++中AUD_Reference::get方法的典型用法代码示例。如果您正苦于以下问题:C++ AUD_Reference::get方法的具体用法?C++ AUD_Reference::get怎么用?C++ AUD_Reference::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AUD_Reference
的用法示例。
在下文中一共展示了AUD_Reference::get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AUD_stopPlayback
void AUD_stopPlayback()
{
#ifdef WITH_JACK
AUD_JackDevice* device = dynamic_cast<AUD_JackDevice*>(AUD_device.get());
if(device)
device->stopPlayback();
#endif
}
示例2: AUD_doesPlayback
int AUD_doesPlayback()
{
#ifdef WITH_JACK
AUD_JackDevice* device = dynamic_cast<AUD_JackDevice*>(AUD_device.get());
if(device)
return device->doesPlayback();
#endif
return -1;
}
示例3: AUD_init
int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
{
AUD_Reference<AUD_IDevice> dev;
if(!AUD_device.isNull())
AUD_exit();
try
{
switch(device)
{
case AUD_NULL_DEVICE:
dev = new AUD_NULLDevice();
break;
#ifdef WITH_SDL
case AUD_SDL_DEVICE:
dev = new AUD_SDLDevice(specs, buffersize);
break;
#endif
#ifdef WITH_OPENAL
case AUD_OPENAL_DEVICE:
dev = new AUD_OpenALDevice(specs, buffersize);
break;
#endif
#ifdef WITH_JACK
case AUD_JACK_DEVICE:
#ifdef __APPLE__
struct stat st;
if(stat("/Library/Frameworks/Jackmp.framework", &st) != 0)
{
printf("Warning: Jack Framework not installed\n");
// No break, fall through to default, to return false
}
else
{
#endif
dev = new AUD_JackDevice("Blender", specs, buffersize);
break;
#ifdef __APPLE__
}
#endif
#endif
default:
return false;
}
AUD_device = dev;
AUD_3ddevice = dynamic_cast<AUD_I3DDevice*>(AUD_device.get());
return true;
}
catch(AUD_Exception&)
{
return false;
}
}
示例4: AUD_getSequencerPosition
float AUD_getSequencerPosition(AUD_Handle* handle)
{
#ifdef WITH_JACK
AUD_JackDevice* device = dynamic_cast<AUD_JackDevice*>(AUD_device.get());
if(device)
return device->getPlaybackPosition();
else
#endif
{
assert(handle);
return (*handle)->getPosition();
}
}
示例5: AUD_seekSequencer
void AUD_seekSequencer(AUD_Handle* handle, float time)
{
#ifdef WITH_JACK
AUD_JackDevice* device = dynamic_cast<AUD_JackDevice*>(AUD_device.get());
if(device)
device->seekPlayback(time);
else
#endif
{
assert(handle);
(*handle)->seek(time);
}
}
示例6: AUD_init
int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
{
AUD_Reference<AUD_IDevice> dev;
if(!AUD_device.isNull())
AUD_exit();
try
{
switch(device)
{
case AUD_NULL_DEVICE:
dev = new AUD_NULLDevice();
break;
#ifdef WITH_SDL
case AUD_SDL_DEVICE:
dev = new AUD_SDLDevice(specs, buffersize);
break;
#endif
#ifdef WITH_OPENAL
case AUD_OPENAL_DEVICE:
dev = new AUD_OpenALDevice(specs, buffersize);
break;
#endif
#ifdef WITH_JACK
case AUD_JACK_DEVICE:
dev = new AUD_JackDevice("Blender", specs, buffersize);
break;
#endif
default:
return false;
}
AUD_device = dev;
AUD_3ddevice = dynamic_cast<AUD_I3DDevice*>(AUD_device.get());
return true;
}
catch(AUD_Exception&)
{
return false;
}
}
示例7: AUD_setSyncCallback
void AUD_setSyncCallback(AUD_syncFunction function, void* data)
{
AUD_JackDevice* device = dynamic_cast<AUD_JackDevice*>(AUD_device.get());
if(device)
device->setSyncCallback(function, data);
}