From 9dd89e3a4b9d9f0bfb408c827358f8e97c12373b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 3 May 2008 17:27:00 +0000 Subject: Add slv2_plugin_get_port_ranges. Use slv2_plugin_get_port_ranges in lv2_jack_host and lv2_inspect (significant performance improvement for plugins with lots of ports). git-svn-id: http://svn.drobilla.net/lad/slv2@1193 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/plugin.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'slv2') diff --git a/slv2/plugin.h b/slv2/plugin.h index 0592bfd..435f869 100644 --- a/slv2/plugin.h +++ b/slv2/plugin.h @@ -270,6 +270,22 @@ uint32_t slv2_plugin_get_num_ports(SLV2Plugin p); +/** Get the port ranges (minimum, maximum and default values) for all ports. + * + * min_values, max_values and def_values must either point to an array of + * N floats, where N is the value returned by slv2_plugin_get_num_ports() for + * this plugin, or NULL. This function will set the elements of the non-NULL + * array pointers to the minimum, maximum and default values of the ports on + * this plugin, with array index corresponding to port index. If a port doesn't + * have a minimum, maximum or default value, the corresponding array element will + * be set to NAN. + */ +void +slv2_plugin_get_port_ranges(SLV2Plugin p, + float* min_values, + float* max_values, + float* def_values); + /** Get the number of ports on this plugin that are members of some class(es). * * Note that this is a varargs function so ports fitting any type 'profile' -- cgit v1.2.1