1 #ifndef __PLUGINLV2_H__
2 #define __PLUGINLV2_H__
4 #define LV2_SEQ_SIZE 9624
6 #include "pluginlv2config.h"
10 #define NS_EXT "http://lv2plug.in/ns/ext/"
15 int nb_inputs, nb_outputs;
18 #define PORTS_AUDIO 0x01
19 #define PORTS_CONTROL 0x02
20 #define PORTS_ATOM 0x04
21 #define PORTS_ALL (PORTS_AUDIO | PORTS_CONTROL | PORTS_ATOM)
22 #define PORTS_INPUT 0x08
23 #define PORTS_OUTPUT 0x10
24 #define PORTS_UPDATE 0x20
34 float **in_buffers, **out_buffers;
36 int nb_inputs, nb_outputs;
37 int max_bufsz, ui_features;
40 int load_lv2(const char *path,char *title=0);
41 int init_lv2(PluginLV2ClientConfig &conf, int sample_rate);
43 static LV2_URID uri_table_map(LV2_URID_Map_Handle handle, const char *uri);
44 static const char *uri_table_unmap(LV2_URID_Map_Handle handle, LV2_URID urid);
45 void connect_ports(PluginLV2ClientConfig &conf, int ports);
47 void new_buffer(int64_t sz);
48 shm_bfr_t *shm_buffer(int shmid);
49 void init_buffer(int samples);
53 const LilvPlugin *lilv;
56 PluginLV2UriTable uri_table;
58 LV2_Feature map_feature;
60 LV2_Feature unmap_feature;
62 LV2_Atom_Sequence seq_in[2];
63 LV2_Atom_Sequence *seq_out;
69 LilvNode *atom_AtomPort;
70 LilvNode *atom_Sequence;
71 LilvNode *lv2_AudioPort;
73 LilvNode *lv2_ControlPort;
74 LilvNode *lv2_Optional;
75 LilvNode *lv2_InputPort;
76 LilvNode *lv2_OutputPort;
77 LilvNode *powerOf2BlockLength;
78 LilvNode *fixedBlockLength;
79 LilvNode *boundedBlockLength;
82 typedef struct { int sample_rate; char path[1]; } open_bfr_t;