From 16c46c9206b4d7306ef74671bb4464c6973c407c Mon Sep 17 00:00:00 2001 From: ak5k <42914711+ak5k@users.noreply.github.com> Date: Fri, 18 Feb 2022 20:16:27 +0200 Subject: [PATCH] dev --- source/api.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/api.cpp b/source/api.cpp index 0c91d8b..d6162ce 100644 --- a/source/api.cpp +++ b/source/api.cpp @@ -13,6 +13,7 @@ static bool Do(int command, int val) void Dump() { + std::scoped_lock lock {m}; std::time_t rawtime; std::tm* timeinfo; char buffer[80]; @@ -140,6 +141,7 @@ const char* defstring_Get = static bool Clear(const char* idStringInOptional) { + std::scoped_lock lock {m}; std::string s {idStringInOptional}; if (s.empty()) { controlMap.clear(); @@ -176,6 +178,7 @@ bool Map( control > NUMCONTROLTYPES) { return false; } + std::scoped_lock lk {m}; std::string fxIdString {fxId}; ControlTarget currentControlTarget; currentControlTarget.paramId = std::string(paramId);