Browse Source

Fix carla-lv2 MIDI output

tags/1.9.7
falkTX 8 years ago
parent
commit
58af00a215
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      source/plugin/carla-lv2.cpp

+ 6
- 8
source/plugin/carla-lv2.cpp View File

@@ -516,6 +516,12 @@ public:
Ports::MidiOutData& mData(fPorts.midiOutData[i]);
mData.capacity = seq->atom.size;
mData.offset = 0;

LV2_Atom_Sequence* const mOut(fPorts.midiOuts[i]);
seq->atom.size = sizeof(LV2_Atom_Sequence_Body);
seq->atom.type = fURIs.atomSequence;
seq->body.unit = 0;
seq->body.pad = 0;
}
}

@@ -943,14 +949,6 @@ protected:
if (sizeof(LV2_Atom_Event) + event->size > mData.capacity - mData.offset)
return false;

if (mData.offset == 0)
{
seq->atom.size = 0;
seq->atom.type = fURIs.atomSequence;
seq->body.unit = 0;
seq->body.pad = 0;
}

LV2_Atom_Event* const aev = (LV2_Atom_Event*)(LV2_ATOM_CONTENTS(LV2_Atom_Sequence, seq) + mData.offset);

aev->time.frames = event->time;


Loading…
Cancel
Save