本文整理汇总了C++中AudioPluginInstance::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioPluginInstance::begin方法的具体用法?C++ AudioPluginInstance::begin怎么用?C++ AudioPluginInstance::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioPluginInstance
的用法示例。
在下文中一共展示了AudioPluginInstance::begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ev
//.........这里部分代码省略.........
goto done;
}
int program = arg->i;
QString programName = StudioControl::getPluginProgram
(pluginInstance->getMappedId(), bank, program);
m_mainWindow->slotChangePluginProgram(instrument, position, programName);
} else if (method == "update") {
if (message->getArgCount() != 1) {
RG_DEBUG << "AudioPluginOSCGUIManager: wrong number of args ("
<< message->getArgCount() << ") for update method"
<< endl;
goto done;
}
if (!(arg = message->getArg(0, type)) || type != 's') {
RG_DEBUG << "AudioPluginOSCGUIManager: failed to get GUI URL"
<< endl;
goto done;
}
QString url = &arg->s;
if (!gui) {
RG_DEBUG << "AudioPluginOSCGUIManager: no GUI for update method"
<< endl;
goto done;
}
gui->setGUIUrl(url);
for (AudioPluginInstance::ConfigMap::const_iterator i =
pluginInstance->getConfiguration().begin();
i != pluginInstance->getConfiguration().end(); ++i) {
QString key = strtoqstr(i->first);
QString value = strtoqstr(i->second);
#ifdef DSSI_PROJECT_DIRECTORY_KEY
if (key == PluginIdentifier::RESERVED_PROJECT_DIRECTORY_KEY) {
key = DSSI_PROJECT_DIRECTORY_KEY;
}
#endif
RG_DEBUG << "update: configuration: " << key << " -> "
<< value << endl;
gui->sendConfiguration(key, value);
}
unsigned long rv = StudioControl::getPluginProgram
(pluginInstance->getMappedId(), strtoqstr(pluginInstance->getProgram()));
int bank = rv >> 16;
int program = rv - (bank << 16);
gui->sendProgram(bank, program);
int controlCount = 0;
for (PortInstanceIterator i = pluginInstance->begin();
i != pluginInstance->end(); ++i) {
gui->sendPortValue((*i)->number, (*i)->value);
/* Avoid overloading the GUI if there are lots and lots of ports */
if (++controlCount % 50 == 0)
usleep(300000);