aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-24 18:08:06 -0400
committerDavid Robillard <d@drobilla.net>2015-10-24 18:08:06 -0400
commit295427ca31f17a587d882086b6388dffbb373422 (patch)
treef8ab403980f77d0e4bb7937f8579968b5df69d4b
parentb041b087d18197553a439603cdaf5102a9a73cfa (diff)
downloadlv2-295427ca31f17a587d882086b6388dffbb373422.tar.xz
Support all Object types in plugin protocols
-rw-r--r--plugins/eg-fifths.lv2/uris.h2
-rw-r--r--plugins/eg-scope.lv2/examploscope.c2
-rw-r--r--plugins/eg-scope.lv2/examploscope_ui.c2
-rw-r--r--plugins/eg-scope.lv2/uris.h2
4 files changed, 2 insertions, 6 deletions
diff --git a/plugins/eg-fifths.lv2/uris.h b/plugins/eg-fifths.lv2/uris.h
index 3e1d400..361334c 100644
--- a/plugins/eg-fifths.lv2/uris.h
+++ b/plugins/eg-fifths.lv2/uris.h
@@ -25,7 +25,6 @@
#define EG_FIFTHS_URI "http://lv2plug.in/plugins/eg-fifths"
typedef struct {
- LV2_URID atom_Blank;
LV2_URID atom_Path;
LV2_URID atom_Resource;
LV2_URID atom_Sequence;
@@ -40,7 +39,6 @@ typedef struct {
static inline void
map_fifths_uris(LV2_URID_Map* map, FifthsURIs* uris)
{
- uris->atom_Blank = map->map(map->handle, LV2_ATOM__Blank);
uris->atom_Path = map->map(map->handle, LV2_ATOM__Path);
uris->atom_Resource = map->map(map->handle, LV2_ATOM__Resource);
uris->atom_Sequence = map->map(map->handle, LV2_ATOM__Sequence);
diff --git a/plugins/eg-scope.lv2/examploscope.c b/plugins/eg-scope.lv2/examploscope.c
index 6d1e953..9860f1d 100644
--- a/plugins/eg-scope.lv2/examploscope.c
+++ b/plugins/eg-scope.lv2/examploscope.c
@@ -260,7 +260,7 @@ run(LV2_Handle handle, uint32_t n_samples)
while (!lv2_atom_sequence_is_end(
&self->control->body, self->control->atom.size, ev)) {
// If the event is an atom:Blank object
- if (ev->body.type == self->uris.atom_Blank) {
+ if (lv2_atom_forge_is_object_type(&self->forge, ev->body.type)) {
const LV2_Atom_Object* obj = (const LV2_Atom_Object*)&ev->body;
if (obj->body.otype == self->uris.ui_On) {
// If the object is a ui-on, the UI was activated
diff --git a/plugins/eg-scope.lv2/examploscope_ui.c b/plugins/eg-scope.lv2/examploscope_ui.c
index 558f624..e2723c6 100644
--- a/plugins/eg-scope.lv2/examploscope_ui.c
+++ b/plugins/eg-scope.lv2/examploscope_ui.c
@@ -631,7 +631,7 @@ port_event(LV2UI_Handle handle,
* - format > 0: Message (atom)
*/
if (format == ui->uris.atom_eventTransfer &&
- atom->type == ui->uris.atom_Blank) {
+ lv2_atom_forge_is_object_type(&ui->forge, atom->type)) {
const LV2_Atom_Object* obj = (const LV2_Atom_Object*)atom;
if (obj->body.otype == ui->uris.RawAudio) {
recv_raw_audio(ui, obj);
diff --git a/plugins/eg-scope.lv2/uris.h b/plugins/eg-scope.lv2/uris.h
index bd57551..7c13c06 100644
--- a/plugins/eg-scope.lv2/uris.h
+++ b/plugins/eg-scope.lv2/uris.h
@@ -26,7 +26,6 @@
typedef struct {
// URIs defined in LV2 specifications
- LV2_URID atom_Blank;
LV2_URID atom_Vector;
LV2_URID atom_Float;
LV2_URID atom_Int;
@@ -50,7 +49,6 @@ typedef struct {
static inline void
map_sco_uris(LV2_URID_Map* map, ScoLV2URIs* uris)
{
- uris->atom_Blank = map->map(map->handle, LV2_ATOM__Blank);
uris->atom_Vector = map->map(map->handle, LV2_ATOM__Vector);
uris->atom_Float = map->map(map->handle, LV2_ATOM__Float);
uris->atom_Int = map->map(map->handle, LV2_ATOM__Int);