diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-30 17:37:50 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-30 17:37:50 +0100 |
commit | 75b19928e264ed5a58077498fd61f71e99dc400d (patch) | |
tree | d03c7d8239074566b8b30c95c8b02772bf875da7 /pluginlv2.h | |
parent | dfe71a21e5a190e5228964265c62416779454bec (diff) |
Add interface to set midnam data from the outside
Diffstat (limited to 'pluginlv2.h')
-rw-r--r-- | pluginlv2.h | 13 |
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}; |