MCPcopy Create free account
hub / github.com/DISTRHO/DPF / appendFromUI

Method appendFromUI

distrho/src/DistrhoPluginVST3.cpp:497–521  ·  view source on GitHub ↗

NOTE always runs first

Source from the content-addressed store, hash-verified

495 #if DISTRHO_PLUGIN_HAS_UI
496 // NOTE always runs first
497 bool appendFromUI(const uint8_t midiData[3])
498 {
499 InputEventStorage& eventStorage(eventListStorage[numUsed]);
500
501 eventStorage.type = UI_MIDI;
502 std::memcpy(eventStorage.midi, midiData, sizeof(uint8_t)*3);
503
504 InputEvent* const event = &eventList[numUsed];
505
506 event->sampleOffset = 0;
507 event->storage = &eventStorage;
508 event->next = nullptr;
509
510 if (numUsed == 0)
511 {
512 firstEvent = lastEvent = event;
513 }
514 else
515 {
516 lastEvent->next = event;
517 lastEvent = event;
518 }
519
520 return ++numUsed == kMaxMidiEvents;
521 }
522 #endif
523
524 private:

Callers 1

processFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected