diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/eg04-sampler.lv2/sampler.c | 2 | ||||
-rw-r--r-- | plugins/eg04-sampler.lv2/uris.h | 11 | ||||
-rw-r--r-- | plugins/eg05-scope.lv2/examploscope.c | 4 | ||||
-rw-r--r-- | plugins/eg05-scope.lv2/examploscope_ui.c | 12 |
4 files changed, 11 insertions, 18 deletions
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); diff --git a/plugins/eg05-scope.lv2/examploscope.c b/plugins/eg05-scope.lv2/examploscope.c index 31e757a..6c40887 100644 --- a/plugins/eg05-scope.lv2/examploscope.c +++ b/plugins/eg05-scope.lv2/examploscope.c @@ -187,7 +187,7 @@ tx_rawaudio(LV2_Atom_Forge* forge, // Forge container object of type 'RawAudio' lv2_atom_forge_frame_time(forge, 0); - lv2_atom_forge_blank(forge, &frame, 1, uris->RawAudio); + lv2_atom_forge_object(forge, &frame, 0, uris->RawAudio); // Add integer 'channelID' property lv2_atom_forge_property_head(forge, uris->channelID, 0); @@ -240,7 +240,7 @@ run(LV2_Handle handle, uint32_t n_samples) // Forge container object of type 'ui_state' LV2_Atom_Forge_Frame frame; lv2_atom_forge_frame_time(&self->forge, 0); - lv2_atom_forge_blank(&self->forge, &frame, 1, self->uris.ui_State); + lv2_atom_forge_object(&self->forge, &frame, 0, self->uris.ui_State); // Add UI state as properties lv2_atom_forge_property_head(&self->forge, self->uris.ui_spp, 0); diff --git a/plugins/eg05-scope.lv2/examploscope_ui.c b/plugins/eg05-scope.lv2/examploscope_ui.c index 4061ff9..edb64f9 100644 --- a/plugins/eg05-scope.lv2/examploscope_ui.c +++ b/plugins/eg05-scope.lv2/examploscope_ui.c @@ -87,8 +87,8 @@ send_ui_state(LV2UI_Handle handle) // Event body is a ui_state object LV2_Atom_Forge_Frame frame; - LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_blank( - &ui->forge, &frame, 1, ui->uris.ui_State); + LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object( + &ui->forge, &frame, 0, ui->uris.ui_State); // msg[samples-per-pixel] = integer lv2_atom_forge_property_head(&ui->forge, ui->uris.ui_spp, 0); @@ -118,8 +118,8 @@ send_ui_disable(LV2UI_Handle handle) lv2_atom_forge_set_buffer(&ui->forge, obj_buf, sizeof(obj_buf)); LV2_Atom_Forge_Frame frame; - LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_blank( - &ui->forge, &frame, 1, ui->uris.ui_Off); + LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object( + &ui->forge, &frame, 0, ui->uris.ui_Off); lv2_atom_forge_pop(&ui->forge, &frame); ui->write(ui->controller, 0, @@ -142,8 +142,8 @@ send_ui_enable(LV2UI_Handle handle) lv2_atom_forge_set_buffer(&ui->forge, obj_buf, sizeof(obj_buf)); LV2_Atom_Forge_Frame frame; - LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_blank( - &ui->forge, &frame, 1, ui->uris.ui_On); + LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object( + &ui->forge, &frame, 0, ui->uris.ui_On); lv2_atom_forge_pop(&ui->forge, &frame); ui->write(ui->controller, 0, |