Commit b950c7e4 authored by jhammen's avatar jhammen
Browse files

ui requests patch from dsp on init

parent b9753ed9
......@@ -159,6 +159,14 @@ PluginUi::PluginUi(const LV2_Feature *const *features, LV2UI_Widget *widget,
gtk_box_pack_start(GTK_BOX(outerBox), mainGain, FALSE, FALSE, 3);
gtk_box_pack_start(GTK_BOX(outerBox), gtk_hseparator_new(), FALSE, FALSE, 3);
gtk_box_pack_start(GTK_BOX(outerBox), lastBox, FALSE, FALSE, 3);
// request patch info from dsp
lv2_atom_forge_set_buffer(&forge, outBuffer, sizeof(outBuffer));
LV2_Atom_Forge_Frame frame;
LV2_Atom *msg = (LV2_Atom *)lv2_atom_forge_object(&forge, &frame, 0, uris.patch_Get);
lv2_atom_forge_pop(&forge, &frame);
write(controller, 0, lv2_atom_total_size(msg), uris.atom_eventTransfer, msg);
*widget = outerBox;
}
......@@ -221,6 +229,7 @@ void PluginUi::notify(uint32_t format, const LV2_Atom *atom) {
mesg.append(errs);
showError(mesg.c_str());
} else {
printf("UI! got patch with %d\n", root.size());
gtk_tree_store_clear(treestore);
for (uint i = 0; i < root.size(); i++) {
int channel = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment