diff options
author | David Robillard <d@drobilla.net> | 2008-01-27 07:49:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-01-27 07:49:37 +0000 |
commit | 6de587b04154f2efdc2a94c0a78225f7adc88ff9 (patch) | |
tree | a25b1b2e1e80fe8d7fe9a16336d9077d3b0d64b2 /utils/lv2_inspect.c | |
parent | 6f4460aee9962a49ae872eef42ba75a439ea6e59 (diff) | |
download | lilv-6de587b04154f2efdc2a94c0a78225f7adc88ff9.tar.gz lilv-6de587b04154f2efdc2a94c0a78225f7adc88ff9.tar.bz2 lilv-6de587b04154f2efdc2a94c0a78225f7adc88ff9.zip |
Packaging stuff.
Add scale points API.
Display scale points in lv2_inspect.
Fix bugs resulting in returning empty collections.
git-svn-id: http://svn.drobilla.net/lad/slv2@1114 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'utils/lv2_inspect.c')
-rw-r--r-- | utils/lv2_inspect.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c index fca4d6c..266d9e6 100644 --- a/utils/lv2_inspect.c +++ b/utils/lv2_inspect.c @@ -52,6 +52,17 @@ print_port(SLV2Plugin p, uint32_t index) slv2_values_free(supported); } + SLV2ScalePoints points = slv2_port_get_scale_points(p, port); + if (points) + printf("\t\tScale Points:\n"); + for (unsigned i=0; i < slv2_scale_points_size(points); ++i) { + SLV2ScalePoint p = slv2_scale_points_get_at(points, i); + printf("\t\t\t%s = \"%s\"\n", + slv2_value_as_string(slv2_scale_point_get_value(p)), + slv2_value_as_string(slv2_scale_point_get_label(p))); + } + slv2_scale_points_free(points); + SLV2Value val = slv2_port_get_symbol(p, port); printf("\n\t\tSymbol: %s\n", slv2_value_as_string(val)); @@ -162,28 +173,32 @@ print_plugin(SLV2Plugin p) /* Required Features */ SLV2Values features = slv2_plugin_get_required_features(p); - printf("\tRequired Features: "); + if (features) + printf("\tRequired Features: "); for (unsigned i=0; i < slv2_values_size(features); ++i) { if (i > 0) { printf("\n\t "); } printf("%s\n", slv2_value_as_uri(slv2_values_get_at(features, i))); } - printf("\n"); + if (features) + printf("\n"); slv2_values_free(features); /* Optional Features */ features = slv2_plugin_get_optional_features(p); - printf("\tOptional Features: "); + if (features) + printf("\tOptional Features: "); for (unsigned i=0; i < slv2_values_size(features); ++i) { if (i > 0) { printf("\n\t "); } printf("%s\n", slv2_value_as_uri(slv2_values_get_at(features, i))); } - printf("\n"); + if (features) + printf("\n"); slv2_values_free(features); |