本文整理汇总了C++中DynamicLibrary::getFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ DynamicLibrary::getFunction方法的具体用法?C++ DynamicLibrary::getFunction怎么用?C++ DynamicLibrary::getFunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DynamicLibrary
的用法示例。
在下文中一共展示了DynamicLibrary::getFunction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OpenSLSession
OpenSLSession (DynamicLibrary& slLibraryToUse,
int numInputChannels, int numOutputChannels,
double samleRateToUse, int bufferSizeToUse,
int numBuffersToUse)
: inputChannels (numInputChannels), outputChannels (numOutputChannels),
sampleRate (samleRateToUse), bufferSize (bufferSizeToUse), numBuffers (numBuffersToUse),
running (false), audioProcessingEnabled (true), callback (nullptr)
{
jassert (numInputChannels > 0 || numOutputChannels > 0);
if (CreateEngineFunc createEngine = (CreateEngineFunc) slLibraryToUse.getFunction ("slCreateEngine"))
{
SLObjectItf obj = nullptr;
SLresult err = createEngine (&obj, 0, nullptr, 0, nullptr, nullptr);
if (err != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS)
{
if (obj != nullptr)
(*obj)->Destroy (obj);
return;
}
engine = SlRef<SLEngineItf_>::cast (SlObjectRef (obj));
}
if (outputChannels > 0)
{
SLObjectItf obj = nullptr;
SLresult err = (*engine)->CreateOutputMix (engine, &obj, 0, nullptr, nullptr);
if (err != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS)
{
if (obj != nullptr)
(*obj)->Destroy (obj);
return;
}
outputMix = SlRef<SLOutputMixItf_>::cast (SlObjectRef (obj));
}
}
示例2: open
bool open()
{
module.open (file.getFullPathName());
moduleMain = (LADSPA_Descriptor_Function) module.getFunction ("ladspa_descriptor");
return moduleMain != nullptr;
}
示例3: getGLPointer
dgl_func_ptr APILoader::getGLPointer(const DynamicLibrary& library, Entrypoint entryp) {
return library.getFunction(GetEntryPointName(entryp));
}