本文整理汇总了C++中PluginLoader::getMainEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginLoader::getMainEntry方法的具体用法?C++ PluginLoader::getMainEntry怎么用?C++ PluginLoader::getMainEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginLoader
的用法示例。
在下文中一共展示了PluginLoader::getMainEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//-------------------------------------------------------------------------------------------------------
int main (int argc, char* argv[])
{
if (!checkPlatform ())
{
printf ("Platform verification failed! Please check your Compiler Settings!\n");
return -1;
}
const char* fileName = "again.dll";
//const char* fileName = "adelay.dll";
//const char* fileName = "surrounddelay.dll";
//const char* fileName = "vstxsynth.dll";
//const char* fileName = "drawtest.dll";
if (argc > 1)
fileName = argv[1];
printf ("HOST> Load library...\n");
PluginLoader loader;
if (!loader.loadLibrary (fileName))
{
printf ("Failed to load VST Plugin library!\n");
return -1;
}
PluginEntryProc mainEntry = loader.getMainEntry ();
if (!mainEntry)
{
printf ("VST Plugin main entry not found!\n");
return -1;
}
printf ("HOST> Create effect...\n");
AEffect* effect = mainEntry (HostCallback);
if (!effect)
{
printf ("Failed to create effect instance!\n");
return -1;
}
printf ("HOST> Init sequence...\n");
effect->dispatcher (effect, effOpen, 0, 0, 0, 0);
effect->dispatcher (effect, effSetSampleRate, 0, 0, 0, kSampleRate);
effect->dispatcher (effect, effSetBlockSize, 0, kBlockSize, 0, 0);
checkEffectProperties (effect);
checkEffectProcessing (effect);
checkEffectEditor (effect);
printf ("HOST> Close effect...\n");
effect->dispatcher (effect, effClose, 0, 0, 0, 0);
return 0;
}