_plugin->dispatcher (_plugin, effSetSampleRate, 0, 0, NULL, (float) _session.frame_rate());
_plugin->dispatcher (_plugin, effSetBlockSize, 0, _session.get_block_size(), NULL, 0.0f);
-
- /* set program to zero */
-
- _plugin->dispatcher (_plugin, effSetProgram, 0, 0, NULL, 0.0f);
}
void
{
LocaleGuard lg (X_("POSIX"));
- if (_state->current_program != -1) {
- char buf[32];
- snprintf (buf, sizeof (buf), "%d", _state->current_program);
- root->add_property ("current-program", buf);
- }
-
if (_plugin->flags & 32 /* effFlagsProgramsChunks */) {
gchar* data = get_chunk (false);
return 0;
}
- const XMLProperty* prop;
-
- if ((prop = node.property ("current-program")) != 0) {
- _state->want_program = atoi (prop->value().c_str());
- }
-
XMLNode* child;
int ret = -1;
_plugin->setParameter (_plugin, param, val);
}
- /* program number is not knowable */
-
- _state->current_program = -1;
-
ret = 0;
}
if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) {
-#ifdef VESTIGE_COMPLETE
-
/* i have yet to find or hear of a VST plugin that uses this */
if (prop.flags & kVstParameterUsesIntegerMinMax) {
desc.logarithmic = false;
desc.sr_dependent = false;
desc.label = prop.label;
-#endif
} else {
return false;
- }
- else {
+ } else {
+
for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) {
if ((*j)->name() == X_("Parameter")) {
XMLProperty* index = (*j)->property (X_("index"));
p->add_content (string (data));
g_free (data);
- }
- else {
+ } else {
p = new XMLNode (X_("Preset"));
p->add_property (X_("uri"), uri);