From 1cb9f77d07c998108d0ba54811ac4604a2b49725 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Jan 2014 00:55:35 +0000 Subject: atom: Deprecate Blank and Resource in favour of just Object. atom: Add lv2_atom_forge_is_object_type() and lv2_atom_forge_is_blank() to ease backwards compatibility. atom: Add lv2_atom_forge_key() for terser object writing. patch: Add patch:sequenceNumber for associating replies with requests. lv2specgen: Display deprecated warning on classes marked owl:deprecated. --- plugins/eg04-sampler.lv2/sampler.c | 2 +- plugins/eg04-sampler.lv2/uris.h | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'plugins/eg04-sampler.lv2') diff --git a/plugins/eg04-sampler.lv2/sampler.c b/plugins/eg04-sampler.lv2/sampler.c index 70f31c5..ee17312 100644 --- a/plugins/eg04-sampler.lv2/sampler.c +++ b/plugins/eg04-sampler.lv2/sampler.c @@ -342,7 +342,7 @@ run(LV2_Handle instance, default: break; } - } else if (is_object_type(uris, ev->body.type)) { + } else 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 == uris->patch_Set) { // Received a set message, send it to the worker. diff --git a/plugins/eg04-sampler.lv2/uris.h b/plugins/eg04-sampler.lv2/uris.h index 1c00280..c981f9e 100644 --- a/plugins/eg04-sampler.lv2/uris.h +++ b/plugins/eg04-sampler.lv2/uris.h @@ -61,13 +61,6 @@ map_sampler_uris(LV2_URID_Map* map, SamplerURIs* uris) uris->patch_value = map->map(map->handle, LV2_PATCH__value); } -static inline bool -is_object_type(const SamplerURIs* uris, LV2_URID type) -{ - return type == uris->atom_Resource - || type == uris->atom_Blank; -} - /** * Write a message like the following to @p forge: * [] @@ -82,8 +75,8 @@ write_set_file(LV2_Atom_Forge* forge, const size_t filename_len) { LV2_Atom_Forge_Frame frame; - LV2_Atom* set = (LV2_Atom*)lv2_atom_forge_blank( - forge, &frame, 1, uris->patch_Set); + LV2_Atom* set = (LV2_Atom*)lv2_atom_forge_object( + forge, &frame, 0, uris->patch_Set); lv2_atom_forge_property_head(forge, uris->patch_property, 0); lv2_atom_forge_urid(forge, uris->eg_sample); -- cgit v1.2.1