From 69e52cb83cf0233648695730c81cdc4f7c4f2a00 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 2 Sep 2006 08:26:17 +0000 Subject: Schema bug fixes (parsable now). Fixed some leaks. Internal query API cleanups. Added latency reporting support. git-svn-id: http://svn.drobilla.net/lad/libslv2@110 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/plugin.h | 21 +++++++++++++++++++++ slv2/private_types.h | 3 ++- slv2/query.h | 5 ++++- 3 files changed, 27 insertions(+), 2 deletions(-) (limited to 'slv2') diff --git a/slv2/plugin.h b/slv2/plugin.h index 01dfc60..2b2a295 100644 --- a/slv2/plugin.h +++ b/slv2/plugin.h @@ -158,6 +158,27 @@ slv2_plugin_get_property(const SLV2Plugin* p, uint32_t slv2_plugin_get_num_ports(const SLV2Plugin* p); +/** Return whether or not the plugin introduces (and reports) latency. + * + * The index of the latency port can be found with slv2_plugin_get_latency_port + * ONLY if this function returns true. + */ +bool +slv2_plugin_has_latency(const SLV2Plugin* p); + +/** Return the index of the plugin's latency port, or the empty string if the + * plugin has no latency. + * + * It is a fatal error to call this on a plugin without checking if the port + * exists by first calling slv2_plugin_has_latency. + * + * Any plugin that introduces unwanted latency that should be compensated for + * (by hosts with the ability/need) MUST provide this port, which is a control + * rate output port that reports the latency for each cycle in frames. + */ +uint32_t +slv2_plugin_get_latency_port(const SLV2Plugin* p); + /** @} */ diff --git a/slv2/private_types.h b/slv2/private_types.h index a9c60bf..fdfba65 100644 --- a/slv2/private_types.h +++ b/slv2/private_types.h @@ -23,6 +23,7 @@ extern "C" { #endif +#include #include #include @@ -30,7 +31,7 @@ extern "C" { /* If you're a user of SLV2, stop reading this file RIGHT NOW. * Unfortunately it needs to be exposed to allow inlining of some things that * really need to be inlined, but these are opaque types. Don't even think - * about writing code that depends on any information here.... + * about writing code that depends on any information here :) */ diff --git a/slv2/query.h b/slv2/query.h index 9bba619..9f1c93d 100644 --- a/slv2/query.h +++ b/slv2/query.h @@ -86,8 +86,11 @@ rasqal_query_results* slv2_plugin_run_query(const SLV2Plugin* p, const char* query_string); +size_t +slv2_query_get_num_results(rasqal_query_results* results, const char* var_name); + SLV2Property -slv2_query_get_results(rasqal_query_results* results); +slv2_query_get_results(rasqal_query_results* results, const char* var_name); /** Free an SLV2Property. */ void -- cgit v1.2.1