X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Flv2_plugin.h;h=e354599485cb3bd3c3859ad5b8d10b5cee0d3274;hb=3b54a75aa9c03edb32d3960c5aacba640e1901e0;hp=bfc2be3ff12f9ac79221f54f270f6089ffa9b62b;hpb=ef172d7ad6f4498c92c115bc1ffbfd156c677e4e;p=ardour.git diff --git a/libs/ardour/ardour/lv2_plugin.h b/libs/ardour/ardour/lv2_plugin.h index bfc2be3ff1..e354599485 100644 --- a/libs/ardour/ardour/lv2_plugin.h +++ b/libs/ardour/ardour/lv2_plugin.h @@ -28,11 +28,12 @@ #include -#include +#include "pbd/stateful.h" #include #include -#include +#include "ardour/plugin.h" +#include "ardour/uri_map.h" namespace ARDOUR { class AudioEngine; @@ -64,6 +65,7 @@ class LV2Plugin : public ARDOUR::Plugin SLV2Plugin slv2_plugin() { return _plugin; } SLV2UI slv2_ui() { return _ui; } + bool is_external_ui() const; SLV2Port slv2_port(uint32_t i) { return slv2_plugin_get_port_by_index(_plugin, i); } const char* port_symbol(uint32_t port); @@ -93,9 +95,12 @@ class LV2Plugin : public ARDOUR::Plugin _instance = NULL; } - void set_block_size (nframes_t nframes) {} + void set_block_size (nframes_t /*nframes*/) {} - int connect_and_run (BufferSet& bufs, uint32_t& in, uint32_t& out, nframes_t nframes, nframes_t offset); + int connect_and_run (BufferSet& bufs, + ChanMapping in, ChanMapping out, + nframes_t nframes, nframes_t offset); + std::string describe_parameter (Evoral::Parameter); std::string state_node_name() const { return "lv2"; } void print_parameter (uint32_t, char*, uint32_t len) const; @@ -107,10 +112,12 @@ class LV2Plugin : public ARDOUR::Plugin bool parameter_is_output(uint32_t) const; bool parameter_is_toggled(uint32_t) const; + static uint32_t midi_event_type() { return _midi_event_type; } + XMLNode& get_state(); int set_state(const XMLNode& node); bool save_preset(std::string uri); - bool load_preset(const string uri); + bool load_preset(const std::string uri); virtual std::vector get_presets(); bool has_editor() const; @@ -130,14 +137,17 @@ class LV2Plugin : public ARDOUR::Plugin float* _defaults; float* _latency_control_port; bool _was_activated; - vector _port_is_input; - map _port_indices; + std::vector _port_is_input; + std::map _port_indices; typedef struct { const void* (*extension_data)(const char* uri); } LV2_DataAccess; LV2_DataAccess _data_access_extension_data; LV2_Feature _data_access_feature; LV2_Feature _instance_access_feature; + static URIMap _uri_map; + static uint32_t _midi_event_type; + void init (LV2World& world, SLV2Plugin plugin, nframes_t rate); void run (nframes_t nsamples); void latency_compute_run (); @@ -165,6 +175,8 @@ struct LV2World { SLV2Value toggled; SLV2Value srate; SLV2Value gtk_gui; + SLV2Value external_gui; + SLV2Value logarithmic; };