diff options
Diffstat (limited to 'pluginlv2.h')
-rw-r--r-- | pluginlv2.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pluginlv2.h b/pluginlv2.h index 43563cc..2ff2226 100644 --- a/pluginlv2.h +++ b/pluginlv2.h @@ -29,6 +29,7 @@ #include <plugin.h> #include <array> +#include <atomic> #include <lv2/lv2plug.in/ns/lv2core/lv2.h> #include <lv2/lv2plug.in/ns/ext/urid/urid.h> @@ -62,7 +63,7 @@ public: virtual ~PluginLV2() = default; //! Not used in LV2 - void init() override {} + void init() override; //! Get current free-wheel mode. bool getFreeWheel() const override; @@ -271,9 +272,8 @@ private: 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}; + std::atomic<bool> midnam_changed{false}; + std::array<std::pair<int, std::string>, 127> midnamData; // At most 127 different midinotes. bool active{false}; |