Make sure PluginInfo.type is always set plus replace a mindless class cast kludge...
[ardour.git] / libs / ardour / ardour / vst_plugin.h
index 5253da7b0a0ad6ca2113327d5f959af6cf70f073..4240dd0fe5764d7a781e5b3b102cb766e83deade 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_vst_plugin_h__
@@ -31,7 +30,6 @@
 #include <sigc++/signal.h>
 #include <pbd/stateful.h> 
 #include <jack/types.h>
-#include <ardour/plugin_state.h>
 #include <ardour/plugin.h>
 
 using std::string;
@@ -58,13 +56,13 @@ class VSTPlugin : public ARDOUR::Plugin
 
        /* Plugin interface */
        
-       uint32_t unique_id() const;
+       std::string unique_id() const;
        const char * label() const;
        const char * name() const;
        const char * maker() const;
        uint32_t parameter_count() const;
        float default_value (uint32_t port);
-       jack_nframes_t latency() const;
+       nframes_t latency() const;
        void set_parameter (uint32_t port, float val);
        float get_parameter (uint32_t port) const;
        int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
@@ -72,10 +70,8 @@ class VSTPlugin : public ARDOUR::Plugin
        uint32_t nth_parameter (uint32_t port, bool& ok) const;
        void activate ();
        void deactivate ();
-       void set_block_size (jack_nframes_t nframes);
-       int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, jack_nframes_t nframes, jack_nframes_t offset);
-       void store_state (ARDOUR::PluginState&);
-       void restore_state (ARDOUR::PluginState&);
+       void set_block_size (nframes_t nframes);
+       int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
        string describe_parameter (uint32_t);
        string state_node_name() const { return "vst"; }
        void print_parameter (uint32_t, char*, uint32_t len) const;
@@ -107,12 +103,14 @@ class VSTPlugin : public ARDOUR::Plugin
 class VSTPluginInfo : public PluginInfo
 {
   public:
-       VSTPluginInfo () {}
+       VSTPluginInfo ();
        ~VSTPluginInfo () {}
        
        PluginPtr load (Session& session);
 };
 
+typedef boost::shared_ptr<VSTPluginInfo> VSTPluginInfoPtr;
+
 } // namespace ARDOUR
 
 #endif /* __ardour_vst_plugin_h__ */