Browse Source

Non-working MIDI output

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 4 years ago
parent
commit
3600f441ab
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      src/PluginDriver.hpp

+ 10
- 0
src/PluginDriver.hpp 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);
}
};



Loading…
Cancel
Save