#include <set>
#include <string>
#include <vector>
+#include <boost/enable_shared_from_this.hpp>
#include "ardour/plugin.h"
#include "ardour/uri_map.h"
#include "ardour/worker.h"
#include "pbd/ringbuffer.h"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
typedef struct LV2_Evbuf_Impl LV2_Evbuf;
namespace ARDOUR {
Worker* worker() { return _worker; }
+ uint32_t patch_count() const { return _patch_count; }
+ const char * patch_uri(const uint32_t p) const { if (p < _patch_count) return _patch_value_uri[p]; else return NULL; }
+ const char * patch_key(const uint32_t p) const { if (p < _patch_count) return _patch_value_key[p]; else return NULL; }
+ const char * patch_val(const uint32_t p) const { if (p < _patch_count) return _patch_value_cur[p]; else return NULL; }
+ bool patch_set(const uint32_t p, const char * val);
+ PBD::Signal1<void,const uint32_t> PatchChanged;
+
int work(uint32_t size, const void* data);
int work_response(uint32_t size, const void* data);
uint32_t atom_Path;
uint32_t atom_Sequence;
uint32_t atom_eventTransfer;
+ uint32_t atom_URID;
+ uint32_t atom_Blank;
uint32_t log_Error;
uint32_t log_Note;
uint32_t log_Warning;
uint32_t time_beatsPerMinute;
uint32_t time_frame;
uint32_t time_speed;
+ uint32_t patch_Set;
+ uint32_t patch_property;
+ uint32_t patch_value;
};
static URIDs urids;
double _next_cycle_speed; ///< Expected start frame of next run cycle
PBD::ID _insert_id;
+ uint32_t _patch_count;
+ char ** _patch_value_uri;
+ char ** _patch_value_key;
+ char (*_patch_value_cur)[PATH_MAX]; ///< current value
+ char (*_patch_value_set)[PATH_MAX]; ///< new value to set
+ Glib::Threads::Mutex _patch_set_lock;
+
friend const void* lv2plugin_get_port_value(const char* port_symbol,
void* user_data,
uint32_t* size,
PORT_EVENT = 1 << 4, ///< Old event API event port
PORT_SEQUENCE = 1 << 5, ///< New atom API event port
PORT_MIDI = 1 << 6, ///< Event port understands MIDI
- PORT_POSITION = 1 << 7 ///< Event port understands position
+ PORT_POSITION = 1 << 7, ///< Event port understands position
+ PORT_PATCHMSG = 1 << 8 ///< Event port supports patch:Message
} PortFlag;
typedef unsigned PortFlags;
};
-class LIBARDOUR_API LV2PluginInfo : public PluginInfo {
+class LIBARDOUR_API LV2PluginInfo : public PluginInfo , public boost::enable_shared_from_this<ARDOUR::LV2PluginInfo> {
public:
- LV2PluginInfo (const void* c_plugin);
+ LV2PluginInfo (const char* plugin_uri);
~LV2PluginInfo ();
static PluginInfoList* discover ();
PluginPtr load (Session& session);
- const void* _c_plugin;
+ char * _plugin_uri;
};
typedef boost::shared_ptr<LV2PluginInfo> LV2PluginInfoPtr;