summaryrefslogtreecommitdiffstats
path: root/utils
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 /utils
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 'utils')
-rw-r--r--utils/lv2_inspect.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index c8ffd55..a7aaf1a 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -27,9 +27,37 @@ print_port(SLV2Plugin* p, uint32_t index)
SLV2PortID id = slv2_port_by_index(index);
char* str = NULL;
+ SLV2PortClass cl = SLV2_UNKNOWN_PORT_CLASS;
printf("\n\tPort %d:\n", index);
+ cl = slv2_port_get_class(p, id);
+ printf("\t\tClass: ");
+ switch (cl) {
+ case SLV2_CONTROL_INPUT:
+ printf("Control input");
+ break;
+ case SLV2_CONTROL_OUTPUT:
+ printf("Control output");
+ break;
+ case SLV2_AUDIO_INPUT:
+ printf("Audio input");
+ break;
+ case SLV2_AUDIO_OUTPUT:
+ printf("Audio output");
+ break;
+ case SLV2_MIDI_INPUT:
+ printf("MIDI input");
+ break;
+ case SLV2_MIDI_OUTPUT:
+ printf("MIDI output");
+ break;
+ case SLV2_UNKNOWN_PORT_CLASS:
+ printf("Unknown");
+ break;
+ }
+
+ printf("\n");
str = slv2_port_get_symbol(p, id);
printf("\t\tSymbol: %s\n", str);
free(str);
@@ -37,6 +65,13 @@ print_port(SLV2Plugin* p, uint32_t index)
str = slv2_port_get_name(p, id);
printf("\t\tName: %s\n", str);
free(str);
+
+ if (cl == SLV2_CONTROL_INPUT ||
+ cl == SLV2_CONTROL_OUTPUT) {
+ printf("\t\tMinimum: %f\n", slv2_port_get_minimum_value(p, id));
+ printf("\t\tMaximum: %f\n", slv2_port_get_maximum_value(p, id));
+ printf("\t\tDefault: %f\n", slv2_port_get_default_value(p, id));
+ }
}