diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/eg04-sampler.lv2/uris.h | 4 | ||||
-rw-r--r-- | plugins/eg05-scope.lv2/examploscope.c | 10 | ||||
-rw-r--r-- | plugins/eg05-scope.lv2/examploscope_ui.c | 10 |
3 files changed, 13 insertions, 11 deletions
diff --git a/plugins/eg04-sampler.lv2/uris.h b/plugins/eg04-sampler.lv2/uris.h index f9aa5a7..8e9faee 100644 --- a/plugins/eg04-sampler.lv2/uris.h +++ b/plugins/eg04-sampler.lv2/uris.h @@ -78,9 +78,9 @@ write_set_file(LV2_Atom_Forge* forge, 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_key(forge, uris->patch_property); lv2_atom_forge_urid(forge, uris->eg_sample); - lv2_atom_forge_property_head(forge, uris->patch_value, 0); + lv2_atom_forge_key(forge, uris->patch_value); lv2_atom_forge_path(forge, filename, filename_len); lv2_atom_forge_pop(forge, &frame); diff --git a/plugins/eg05-scope.lv2/examploscope.c b/plugins/eg05-scope.lv2/examploscope.c index 6c40887..b7fb2f3 100644 --- a/plugins/eg05-scope.lv2/examploscope.c +++ b/plugins/eg05-scope.lv2/examploscope.c @@ -190,11 +190,11 @@ tx_rawaudio(LV2_Atom_Forge* forge, lv2_atom_forge_object(forge, &frame, 0, uris->RawAudio); // Add integer 'channelID' property - lv2_atom_forge_property_head(forge, uris->channelID, 0); + lv2_atom_forge_key(forge, uris->channelID); lv2_atom_forge_int(forge, channel); // Add vector of floats 'audioData' property - lv2_atom_forge_property_head(forge, uris->audioData, 0); + lv2_atom_forge_key(forge, uris->audioData); lv2_atom_forge_vector( forge, sizeof(float), uris->atom_Float, n_samples, data); @@ -243,11 +243,11 @@ run(LV2_Handle handle, uint32_t n_samples) 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); + lv2_atom_forge_key(&self->forge, self->uris.ui_spp); lv2_atom_forge_int(&self->forge, self->ui_spp); - lv2_atom_forge_property_head(&self->forge, self->uris.ui_amp, 0); + lv2_atom_forge_key(&self->forge, self->uris.ui_amp); lv2_atom_forge_float(&self->forge, self->ui_amp); - lv2_atom_forge_property_head(&self->forge, self->uris.param_sampleRate, 0); + lv2_atom_forge_key(&self->forge, self->uris.param_sampleRate); lv2_atom_forge_float(&self->forge, self->rate); lv2_atom_forge_pop(&self->forge, &frame); } diff --git a/plugins/eg05-scope.lv2/examploscope_ui.c b/plugins/eg05-scope.lv2/examploscope_ui.c index edb64f9..a8c1e2c 100644 --- a/plugins/eg05-scope.lv2/examploscope_ui.c +++ b/plugins/eg05-scope.lv2/examploscope_ui.c @@ -85,18 +85,20 @@ send_ui_state(LV2UI_Handle handle) uint8_t obj_buf[1024]; lv2_atom_forge_set_buffer(&ui->forge, obj_buf, sizeof(obj_buf)); - // Event body is a ui_state object + // Start a ui:State object LV2_Atom_Forge_Frame frame; 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); + lv2_atom_forge_key(&ui->forge, ui->uris.ui_spp); lv2_atom_forge_int(&ui->forge, ui->stride); + // msg[amplitude] = float - lv2_atom_forge_property_head(&ui->forge, ui->uris.ui_amp, 0); + lv2_atom_forge_key(&ui->forge, ui->uris.ui_amp); lv2_atom_forge_float(&ui->forge, gain); - // Close off forged data + + // Finish ui:State object lv2_atom_forge_pop(&ui->forge, &frame); // Send message to plugin port '0' |