summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-02 08:26:17 +0000
committerDavid Robillard <d@drobilla.net>2006-09-02 08:26:17 +0000
commit69e52cb83cf0233648695730c81cdc4f7c4f2a00 (patch)
tree5e8ebb5773cba2c1ffd827baf9a4fe528fbcaeeb /slv2
parentcf11310c243320bbe53dbf7c6738cc84e33ba9d3 (diff)
downloadlilv-69e52cb83cf0233648695730c81cdc4f7c4f2a00.tar.gz
lilv-69e52cb83cf0233648695730c81cdc4f7c4f2a00.tar.bz2
lilv-69e52cb83cf0233648695730c81cdc4f7c4f2a00.zip
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
Diffstat (limited to 'slv2')
-rw-r--r--slv2/plugin.h21
-rw-r--r--slv2/private_types.h3
-rw-r--r--slv2/query.h5
3 files changed, 27 insertions, 2 deletions
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 <stdbool.h>
#include <stddef.h>
#include <lv2.h>
@@ -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