diff options
Diffstat (limited to 'src/port.h')
-rw-r--r-- | src/port.h | 22 |
1 files changed, 7 insertions, 15 deletions
@@ -5,30 +5,22 @@ #define JALV_PORT_H #include "attributes.h" -#include "lv2_evbuf.h" +#include "types.h" -#include "lilv/lilv.h" +#include <lilv/lilv.h> -#include <stddef.h> #include <stdint.h> +// Application port state JALV_BEGIN_DECLS -enum PortFlow { FLOW_UNKNOWN, FLOW_INPUT, FLOW_OUTPUT }; - -enum PortType { TYPE_UNKNOWN, TYPE_CONTROL, TYPE_AUDIO, TYPE_EVENT, TYPE_CV }; - -struct Port { +typedef struct { const LilvPort* lilv_port; ///< LV2 port - enum PortType type; ///< Data type - enum PortFlow flow; ///< Data flow direction - void* sys_port; ///< For audio/MIDI ports, otherwise NULL - LV2_Evbuf* evbuf; ///< For MIDI ports, otherwise NULL + PortType type; ///< Data type + PortFlow flow; ///< Data flow direction void* widget; ///< Control widget, if applicable - size_t buf_size; ///< Custom buffer size, or 0 uint32_t index; ///< Port index - float control; ///< For control ports, otherwise 0.0f -}; +} JalvPort; JALV_END_DECLS |