along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <algorithm>
activate ();
}
-void
-VSTPlugin::store_state (PluginState& state)
-{
-}
-
-void
-VSTPlugin::restore_state (PluginState& state)
-{
-}
-
float
VSTPlugin::default_value (uint32_t port)
{
{
XMLNode *root = new XMLNode (state_node_name());
LocaleGuard lg (X_("POSIX"));
-
+
if (_plugin->flags & effFlagsProgramChunks) {
/* fetch the current chunk */
string path;
struct stat sbuf;
- path = getenv ("HOME");
- path += "/.ardour/vst";
+ path = get_user_ardour_path ();
+ path += "vst";
if (stat (path.c_str(), &sbuf)) {
if (errno == ENOENT) {
} else {
- error << string_compose (_("cannot check VST chunk directory: %1"),
- strerror (errno))
- << endmsg;
+ warning << string_compose (_("cannot check VST chunk directory: %1"), strerror (errno))
+ << endmsg;
return *root;
}
_plugin->dispatcher (_plugin, effMainsChanged, 0, 1, NULL, 0.0f);
}
-uint32_t
+string
VSTPlugin::unique_id() const
{
- return _plugin->uniqueID;
+ char buf[32];
+ snprintf (buf, sizeof (buf), "%d", _plugin->uniqueID);
+ return string (buf);
}