Hello! I'm completely stucked with LV2 documentiation and the difference between lv2_atom_forge_resource and lv2_atom_forge_object. I'm trying to remove the deprecated lv2_atom_forge_resource from DrMr fork. The documentation suggests that lv2_atom_forge_resource is "The same as lv2_atom_forge_object(), but for object:Resource. This function is deprecated and should not be used in new code. Use lv2_atom_forge_object() directly instead."
But what that means, how is that - "directly"? For example, here are the working code:
Code: Select all
LV2_Atom_Forge_Frame set_frame;
uint8_t msg_buf[1024];
lv2_atom_forge_set_buffer (&ui->forge, msg_buf, 1024);
LV2_Atom *msg = (LV2_Atom*)lv2_atom_forge_resource (&ui->forge, &set_frame, 1, ui->uris.ui_msg);
(*add_data)(ui, data);
lv2_atom_forge_pop (&ui->forge, &set_frame);
ui->write (ui->controller, DRUMROX_CONTROL, lv2_atom_total_size(msg), ui->uris.atom_eventTransfer, msg);
If I change lv2_atom_forge_resource to lv2_atom_forge_object, it won't work. What is the difference, what is the object here - forge, set_frame?