From a4c05a11cb7929b5bba65adedf6ac42665890155 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 3 Jan 2018 11:59:14 +0100 Subject: [PATCH] Fix crash loading bridged plugins with latency --- source/backend/plugin/CarlaPluginBridge.cpp | 8 ++++++-- source/modules/water/threads/SpinLock.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/backend/plugin/CarlaPluginBridge.cpp b/source/backend/plugin/CarlaPluginBridge.cpp index 5143fd905..42932f2e2 100644 --- a/source/backend/plugin/CarlaPluginBridge.cpp +++ b/source/backend/plugin/CarlaPluginBridge.cpp @@ -2079,8 +2079,12 @@ public: } break; case kPluginBridgeNonRtServerSetLatency: - // FIXME - if (true) break; + if (true) + { + // FIXME - latency adjust code on this file is broken + fShmNonRtServerControl.readUInt(); + break; + } // uint fLatency = fShmNonRtServerControl.readUInt(); diff --git a/source/modules/water/threads/SpinLock.h b/source/modules/water/threads/SpinLock.h index 3d315ab9e..bf9046899 100644 --- a/source/modules/water/threads/SpinLock.h +++ b/source/modules/water/threads/SpinLock.h @@ -87,7 +87,7 @@ public: /** Releases the lock. */ inline void exit() const noexcept { - CARLA_SAFE_ASSERT_RETURN(lock.value == 1,); + CARLA_SAFE_ASSERT_RETURN(lock.get() == 1,); lock = 0; }