summaryrefslogtreecommitdiff
path: root/pluginlv2.h
diff options
context:
space:
mode:
Diffstat (limited to 'pluginlv2.h')
-rw-r--r--pluginlv2.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/pluginlv2.h b/pluginlv2.h
index 10f816e..43563cc 100644
--- a/pluginlv2.h
+++ b/pluginlv2.h
@@ -28,6 +28,8 @@
#include <plugin.h>
+#include <array>
+
#include <lv2/lv2plug.in/ns/lv2core/lv2.h>
#include <lv2/lv2plug.in/ns/ext/urid/urid.h>
#include <lv2/lv2plug.in/ns/ext/state/state.h>
@@ -36,13 +38,13 @@
#include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
#define DISPLAY_INTERFACE
-#define MIDNAME_INTERFACE
+#define MIDNAM_INTERFACE
#ifdef DISPLAY_INTERFACE
#include "inline-display.h"
#endif
-#ifdef MIDNAME_INTERFACE
+#ifdef MIDNAM_INTERFACE
#include "midnam_lv2.h"
#endif
@@ -119,6 +121,8 @@ public:
//! This must remain constant during the lifespan of the plugin instance.
virtual std::size_t getNumberOfMidiOutputs() override = 0;
+ //! Call this method to set midnam data for midi input
+ virtual void setMidnamData(const std::vector<std::pair<int, std::string>>& midnam) override;
//! Get unique plugin id.
std::string getId() override = 0;
@@ -261,12 +265,15 @@ private:
uint32_t max_h);
#endif
-#ifdef MIDNAME_INTERFACE
+#ifdef MIDNAM_INTERFACE
LV2_Midnam* midnam{nullptr};
static char* MidnamFile (LV2_Handle instance);
static char* MidnamModel (LV2_Handle instance);
static void MidnamFree (char*);
#endif
+ // TODO:: Make this list thread safe!
+ std::array<std::pair<int, std::string>, 127> midnamData;
+ volatile bool midnam_changed{false};
bool active{false};