aboutsummaryrefslogtreecommitdiff
path: root/vm.h
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-23 17:34:21 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-03-23 17:34:21 +0100
commit02de8e72284619db9d9529380710458420518fa4 (patch)
treedef53302fe8f06b905d5aa0553607daf4409b828 /vm.h
parent3a9f0f747a5356b6ec304867db716f0e3ccb07ae (diff)
downloadvm.lv2-02de8e72284619db9d9529380710458420518fa4.tar.xz
prototype audio mixer widget.
Diffstat (limited to 'vm.h')
-rw-r--r--vm.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/vm.h b/vm.h
index 0f5af61..24ecc54 100644
--- a/vm.h
+++ b/vm.h
@@ -59,6 +59,7 @@
#include <props.lv2/props.h>
+typedef enum _vm_plug_enum_t vm_plug_enum_t;
typedef enum _vm_status_t vm_status_t;
typedef enum _vm_opcode_enum_t vm_opcode_enum_t;
typedef enum _vm_command_enum_t vm_command_enum_t;
@@ -67,6 +68,13 @@ typedef struct _vm_api_def_t vm_api_def_t;
typedef struct _vm_api_impl_t vm_api_impl_t;
typedef struct _plugstate_t plugstate_t;
+enum _vm_plug_enum_t {
+ VM_PLUG_CONTROL = 0,
+ VM_PLUG_CV,
+ VM_PLUG_AUDIO,
+ VM_PLUG_ATOM
+};
+
enum _vm_status_t {
VM_STATUS_STATIC = (0 << 0),
VM_STATUS_HAS_TIME = (1 << 1),
@@ -797,6 +805,21 @@ static const vm_api_def_t vm_api_def [OP_MAX] = {
},
};
+static vm_plug_enum_t
+vm_plug_type(const char *plugin_uri)
+{
+ if(!strcmp(plugin_uri, VM_PREFIX"control"))
+ return VM_PLUG_CONTROL;
+ else if(!strcmp(plugin_uri, VM_PREFIX"cv"))
+ return VM_PLUG_CV;
+ else if(!strcmp(plugin_uri, VM_PREFIX"audio"))
+ return VM_PLUG_AUDIO;
+ else if(!strcmp(plugin_uri, VM_PREFIX"atom"))
+ return VM_PLUG_ATOM;
+
+ return VM_PLUG_CONTROL;
+}
+
static inline void
vm_api_init(vm_api_impl_t *impl, LV2_URID_Map *map)
{