Non-working MIDI output

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-10-21 23:02:03 +01:00
parent 70d2f63acc
commit 3600f441ab
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -208,6 +208,16 @@ struct CardinalMidiOutputDevice : rack::midi::OutputDevice
void sendMessage(const rack::midi::Message& message) override
{
DISTRHO_SAFE_ASSERT_RETURN(fPlugin->isProcessing(),);
if (message.bytes.size() > MidiEvent::kDataSize)
return;
MidiEvent event;
event.frame = message.frame < 0 ? 0 : message.frame;
event.size = 3; // FIXME
std::memcpy(event.data, message.bytes.data(), event.size);
fPlugin->writeMidiEvent(event);
}
};