some totally untested FST/VST changes
[ardour.git] / libs / ardour / vst_plugin.cc
index e4e623c356b2d1d5bb52e9650a9a957b61e701f6..eb067d6c5a8ca02d0951f73353e9456cb5618bde 100644 (file)
@@ -222,7 +222,11 @@ VSTPlugin::set_state(const XMLNode& node)
                        }
                }
 
+               _fst->current_program = _plugin->dispatcher (_plugin, 3, /* effGetProgram */, 0, NULL, NULL, 0);
+               cerr << name() << ": current program is " << _fst->current_program << endl;
+
                return 0;
+
        } else if ((child = find_named_node (node, X_("parameters"))) != 0) {
                
                XMLPropertyList::const_iterator i;
@@ -238,9 +242,15 @@ VSTPlugin::set_state(const XMLNode& node)
                        _plugin->setParameter (_plugin, param, val);
                }
 
+               /* program number is not knowable */
+
+               _fst->current_program = -1;
+
                return 0;
        }
 
+       
+
        return -1;
 }