MCPcopy Create free account
hub / github.com/amsynth/amsynth / work

Function work

src/plugins/lv2/lv2plugin.cpp:271–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static LV2_Worker_Status
272work(LV2_Handle instance,
273 LV2_Worker_Respond_Function /*respond*/,
274 LV2_Worker_Respond_Handle /*handle*/,
275 uint32_t /*size*/,
276 const void* data)
277{
278 LOG_FUNCTION_CALL();
279
280 amsynth_wrapper * a = (amsynth_wrapper *) instance;
281
282 const LV2_Atom_Object *obj = (const LV2_Atom_Object *) data;
283 if (obj->body.otype == a->uris.patch_Set) {
284 const LV2_Atom *property = nullptr;
285 const LV2_Atom *value = nullptr;
286 lv2_atom_object_get(obj,
287 a->uris.patch_property, &property,
288 a->uris.patch_value, &value,
289 0);
290 a->patchSet(((LV2_Atom_URID *) (void *) property)->body, (const char *) LV2_ATOM_BODY_CONST(value));
291 }
292
293 return LV2_WORKER_SUCCESS;
294}
295
296static LV2_Worker_Status
297work_response(LV2_Handle /*instance*/,

Callers

nothing calls this directly

Calls 1

patchSetMethod · 0.80

Tested by

no test coverage detected