diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index e2d763ae..98e789f5 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -544,6 +544,12 @@ endif # --------------------------------------------------------------------------------------------------------------------- # CLAP +ifeq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true) +ifeq ($(HAVE_DGL),true) +CLAP_LIBS = -lpthread +endif +endif + clap: $(clap) $(clapfiles) ifeq ($(HAVE_DGL),true) @@ -553,7 +559,7 @@ $(clap): $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginMain_CLAP.cpp.o endif -@mkdir -p $(shell dirname $@) @echo "Creating CLAP plugin for $(NAME)" - $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(EXTRA_LIBS) $(DGL_LIBS) $(SHARED) $(SYMBOLS_CLAP) -o $@ + $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(EXTRA_LIBS) $(DGL_LIBS) $(CLAP_LIBS) $(SHARED) $(SYMBOLS_CLAP) -o $@ # --------------------------------------------------------------------------------------------------------------------- # Shared diff --git a/distrho/src/DistrhoPluginCLAP.cpp b/distrho/src/DistrhoPluginCLAP.cpp index c1eb6d79..b1635e22 100644 --- a/distrho/src/DistrhoPluginCLAP.cpp +++ b/distrho/src/DistrhoPluginCLAP.cpp @@ -45,6 +45,7 @@ struct ClapEventQueue struct Event { EventType type; uint32_t index; + float plain; double value; }; @@ -346,7 +347,7 @@ private: { const ClapEventQueue::Event ev = { started ? ClapEventQueue::kEventGestureBegin : ClapEventQueue::kEventGestureBegin, - rindex, 0.0 + rindex, 0.f, 0.0 }; fEventQueue.addEventFromUI(ev); } @@ -366,7 +367,7 @@ private: const ClapEventQueue::Event ev = { ClapEventQueue::kEventParamSet, - rindex, value + rindex, plain, value }; fEventQueue.addEventFromUI(ev); } @@ -513,6 +514,7 @@ public: clapEvent.header.type = CLAP_EVENT_PARAM_VALUE; clapEvent.param_id = event.index; clapEvent.value = event.value; + fPlugin.setParameterValue(event.index, event.plain); break; default: continue;