Browse Source

Use an outer frame for carla-lv2 outgoing events

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.1
falkTX 2 years ago
parent
commit
d3eb12e6a1
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      source/plugin/carla-lv2.cpp

+ 9
- 0
source/plugin/carla-lv2.cpp View File

@@ -354,12 +354,17 @@ public:
LV2_Atom_Forge atomForge = fAtomForge;
lv2_atom_forge_set_buffer(&atomForge, atomBuf, sizeof(atomBuf));

LV2_Atom_Forge_Frame outerFrame;
lv2_atom_forge_sequence_head(&atomForge, &outerFrame, 0);

const int numEvents = fNeedsNotifyFileChanged && fPreviewData.shouldSend ? 2 : 1;

if (fNeedsNotifyFileChanged)
{
fNeedsNotifyFileChanged = false;

lv2_atom_forge_frame_time(&atomForge, 0);

LV2_Atom_Forge_Frame forgeFrame;
lv2_atom_forge_object(&atomForge, &forgeFrame, 0, fURIs.patchSet);

@@ -388,6 +393,8 @@ public:
const void* const pbuffer = fPreviewData.buffer;
fPreviewData.shouldSend = false;

lv2_atom_forge_frame_time(&atomForge, 0);

LV2_Atom_Forge_Frame forgeFrame;
lv2_atom_forge_object(&atomForge, &forgeFrame, 0, fURIs.patchSet);

@@ -415,6 +422,8 @@ public:
lv2_atom_forge_pop(&atomForge, &forgeFrame);
}

lv2_atom_forge_pop(&atomForge, &outerFrame);

LV2_Atom* atom = (LV2_Atom*)atomBuf;
LV2_Atom_Sequence* const seq = fPorts.eventsOut[0];
Ports::EventsOutData& mData(fPorts.eventsOutData[0]);


Loading…
Cancel
Save