Fix a problem where VST automation data wasn't getting written (if the adjustments...
[ardour.git] / libs / ardour / plugin.cc
index e76353e8d53ddd3f2ca8b7b9bbc3c9c4e64ca895..f14c56798b65e4cb404c8cf6b8162037baa90fdf 100644 (file)
 #include <cstdlib>
 #include <cstdio> // so libraptor doesn't complain
 #include <cmath>
+#ifndef COMPILER_MSVC
 #include <dirent.h>
+#endif
 #include <sys/stat.h>
 #include <cerrno>
 #include <utility>
 
+#ifdef HAVE_LRDF
 #include <lrdf.h>
+#endif
 
 #include "pbd/compose.h"
 #include "pbd/error.h"
@@ -260,7 +264,7 @@ Plugin::connect_and_run (BufferSet& bufs,
 
                /* Track notes that we are sending to the plugin */
 
-               MidiBuffer& b = bufs.get_midi (0);
+               const MidiBuffer& b = bufs.get_midi (0);
 
                _tracker.track (b.begin(), b.end());
 
@@ -324,6 +328,7 @@ Plugin::get_presets ()
                info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a full version"),
                                        PROGRAM_NAME)
                     << endmsg;
+               seen_set_state_message = true;
        }
 #endif
 
@@ -360,6 +365,12 @@ Plugin::set_parameter (uint32_t which, float)
        ParameterChanged (which, get_parameter (which)); /* EMIT SIGNAL */
 }
 
+void
+Plugin::set_parameter_automated (uint32_t which, float val)
+{
+       Plugin::set_parameter (which, val);
+}
+
 int
 Plugin::set_state (const XMLNode& node, int /*version*/)
 {
@@ -385,17 +396,17 @@ XMLNode &
 Plugin::get_state ()
 {
        XMLNode* root = new XMLNode (state_node_name ());
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root->add_property (X_("last-preset-uri"), _last_preset.uri);
        root->add_property (X_("last-preset-label"), _last_preset.label);
        root->add_property (X_("parameter-changed-since-last-preset"), _parameter_changed_since_last_preset ? X_("yes") : X_("no"));
 
-#ifndef NO_PLUGIN_STATE        
+#ifndef NO_PLUGIN_STATE
        add_state (root);
 #else
        if (!seen_get_state_message) {
-               info << string_compose (_("Saving AudioUnit settings is not supported in this build of %1. Consider paying for a newer version"),
+               info << string_compose (_("Saving plugin settings is not supported in this build of %1. Consider paying for the full version"),
                                        PROGRAM_NAME)
                     << endmsg;
                seen_get_state_message = true;