summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-09 00:17:15 +0000
committerDavid Robillard <d@drobilla.net>2007-02-09 00:17:15 +0000
commit200565b81542d1b0fde1a657b807646733f2508c (patch)
tree85d2b9890c7edc69ee9843812f758f32e9b4fdd6 /slv2
parent735173b0f47f362896594deab1a3b76ac3f7081f (diff)
downloadlilv-200565b81542d1b0fde1a657b807646733f2508c.tar.gz
lilv-200565b81542d1b0fde1a657b807646733f2508c.tar.bz2
lilv-200565b81542d1b0fde1a657b807646733f2508c.zip
Applied patch from Steve Harris, changes to work with new LV2 ontology port classes.
git-svn-id: http://svn.drobilla.net/lad/slv2@291 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2')
-rw-r--r--slv2/port.h2
-rw-r--r--slv2/types.h34
2 files changed, 17 insertions, 19 deletions
diff --git a/slv2/port.h b/slv2/port.h
index 8e5b006..7b1d98a 100644
--- a/slv2/port.h
+++ b/slv2/port.h
@@ -89,7 +89,7 @@ slv2_port_get_name(SLV2Plugin* plugin,
/** Get the class (direction and rate) of a port.
*/
-enum SLV2PortClass
+SLV2PortClass
slv2_port_get_class(SLV2Plugin* plugin,
SLV2PortID id);
diff --git a/slv2/types.h b/slv2/types.h
index 19f1f2b..7e366ba 100644
--- a/slv2/types.h
+++ b/slv2/types.h
@@ -48,30 +48,28 @@ slv2_value_free(SLV2Value);
/** Port ID type, to allow passing either symbol or index
* to port related functions.
*/
-struct _PortID {
+typedef struct _PortID {
bool is_index; /**< Otherwise, symbol */
uint32_t index;
const char* symbol;
-};
-
-typedef struct _PortID SLV2PortID;
+} SLV2PortID;
-/** Class (direction and rate) of a port */
-enum SLV2PortClass {
+/** Class (direction and type) of a port
+ *
+ * Note that ports may be of other classes not listed here, this is just
+ * to make the most common case simple. Use slv2_port_get_value(p, "rdf:type")
+ * if you need further class information.
+ */
+typedef enum _PortClass {
SLV2_UNKNOWN_PORT_CLASS,
- SLV2_CONTROL_RATE_INPUT, /**< One input value per block */
- SLV2_CONTROL_RATE_OUTPUT, /**< One output value per block */
- SLV2_AUDIO_RATE_INPUT, /**< One input value per frame */
- SLV2_AUDIO_RATE_OUTPUT /**< One output value per frame */
-};
-
-
-/** lv2:float, IEEE-754 32-bit floating point number */
-#define SLV2_DATA_TYPE_FLOAT "http://lv2plug.in/ontology#float"
-
-/** MIDI buffer, as defined by lv2-miditype.h */
-#define SLV2_DATA_TYPE_MIDI "http://ll-plugins.nongnu.org/lv2/ext/miditype"
+ SLV2_CONTROL_INPUT, /**< One input float per block */
+ SLV2_CONTROL_OUTPUT, /**< One output float per block */
+ SLV2_AUDIO_INPUT, /**< One input float per frame */
+ SLV2_AUDIO_OUTPUT, /**< One output float per frame */
+ SLV2_MIDI_INPUT, /**< MIDI input (LL extension) */
+ SLV2_MIDI_OUTPUT /**< MIDI output (LL extension) */
+} SLV2PortClass;
#ifdef __cplusplus