aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-04-26 17:51:12 +0000
committerDavid Robillard <d@drobilla.net>2014-04-26 17:51:12 +0000
commit7c84ad8bdb1bd5dbdd8d9437e388b3cdea19157c (patch)
tree4ce59f220b11d6ed7af89dfa8aa1273c2070af11
parenteb3d5ce0b533e4c7df025d1528a95570ee99b975 (diff)
downloadjalv-7c84ad8bdb1bd5dbdd8d9437e388b3cdea19157c.tar.gz
jalv-7c84ad8bdb1bd5dbdd8d9437e388b3cdea19157c.tar.bz2
jalv-7c84ad8bdb1bd5dbdd8d9437e388b3cdea19157c.zip
Add support for data-access extension (close #967).
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5368 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--NEWS3
-rw-r--r--src/jalv.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 24fb391..a282ae6 100644
--- a/NEWS
+++ b/NEWS
@@ -4,8 +4,9 @@ jalv (1.4.5) unstable;
* Generate Qt moc nonsense at build time for broader compatibility
* Update for latest LV2 Atom Object simplifications
* Set port pretty names via new Jack metadata API
+ * Add support for data-access extension (based on patch by Filipe Coelho)
- -- David Robillard <d@drobilla.net> Sun, 06 Apr 2014 02:03:55 -0400
+ -- David Robillard <d@drobilla.net> Sat, 26 Apr 2014 13:50:14 -0400
jalv (1.4.4) stable;
diff --git a/src/jalv.c b/src/jalv.c
index bb4a574..50a818a 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -1,5 +1,5 @@
/*
- Copyright 2007-2012 David Robillard <http://drobilla.net>
+ Copyright 2007-2014 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -50,6 +50,7 @@
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/buf-size/buf-size.h"
+#include "lv2/lv2plug.in/ns/ext/data-access/data-access.h"
#include "lv2/lv2plug.in/ns/ext/event/event.h"
#include "lv2/lv2plug.in/ns/ext/options/options.h"
#include "lv2/lv2plug.in/ns/ext/parameters/parameters.h"
@@ -138,6 +139,8 @@ uri_to_id(LV2_URI_Map_Callback_Data callback_data,
static LV2_URI_Map_Feature uri_map = { NULL, &uri_to_id };
+static LV2_Extension_Data_Feature ext_data = { NULL };
+
static LV2_Feature uri_map_feature = { NS_EXT "uri-map", &uri_map };
static LV2_Feature map_feature = { LV2_URID__map, NULL };
static LV2_Feature unmap_feature = { LV2_URID__unmap, NULL };
@@ -664,9 +667,13 @@ jalv_ui_instantiate(Jalv* jalv, const char* native_ui_type, void* parent)
const LV2_Feature instance_feature = {
NS_EXT "instance-access", lilv_instance_get_handle(jalv->instance)
};
+ const LV2_Feature data_feature = {
+ LV2_DATA_ACCESS_URI, &ext_data
+ };
const LV2_Feature* ui_features[] = {
&uri_map_feature, &map_feature, &unmap_feature,
&instance_feature,
+ &data_feature,
&log_feature,
&parent_feature,
&options_feature,
@@ -1133,6 +1140,8 @@ main(int argc, char** argv)
die("Failed to instantiate plugin.\n");
}
+ ext_data.data_access = lilv_instance_get_descriptor(jalv.instance)->extension_data;
+
fprintf(stderr, "\n");
if (!jalv.buf_size_set) {
jalv_allocate_port_buffers(&jalv);